SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Object Oriented Programming
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
null
floating point numbers
String (String str)
variable
2. Variables that don't contain any data
mutator method
uninitialized variables
encapsulation
autoboxing
3. The values passed into a method in an invocation; these are called the arguments to the method
String object
data values
actual parameters
boolean value
4. The Scanner class is part of ___________________
method
promotion
actual parameters
java.util class libary
5. In the header of a method specifies he types of the values that are passed and the names by which the called method will refer to those values.
set
visibility modifiers
parameter list
service methods
6. When a variable is declared inside a method
string name;
local data
polymorphism
return statement
7. Instance data should be defined with what________ visibility
static
private
actual parameters
string literal
8. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc
java.util class libary
method
primitive variables
method invocation
9. Returns the number of characters in this stirng.
escape sequences
enumerated type
variable
int length( )
10. ++count; -- count
inheritance
higher
prefix form
String next( )
11. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
mutator method
String substring (int offset - int endIndex)
boolean nextBoolean( )
num=Integer.parseInt(str);
12. This declaration creates a Scanner object that reads input from the keyboard
assignment conversion
Scanner scan=new Scanner (System.in);
static
reserved word void
13. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data
double
expression
scope
visibility modifiers
14. Constructor: creates a new string object with the same characters as str.
private
boolean nextBoolean( )
parameter
String (String str)
15. Returns true if the scanner has anotehr token in its input.
attributes of an object
Scanner class
boolean hasNext( )
primitive variables
16. Every object has two things: a state and a _____ of behaviors
parameter
dot operator
NumberFormat class
set
17. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
self-governing
postfix form
uninitialized variables
dot operator
18. An object has behaviors - which are defined by the ________ associated with that object.
double
String next( )
header of a method
operations
19. Also called a selection statement b/c it allows us to choose which statement will be executed next.
instance data
casting
conditional statement
String findInLine (String pattern)
20. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
primitive variables
support methods
polymorphism
aliases
21. Returns the int corresponding to the value stored in the specified string
header of a method
variable declaration
static int parseInt (String str)
String substring (int offset - int endIndex)
22. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held
String (String str)
String next( )
pointer
method invocation
23. An object in Java - defined by the class String
character string
polymorphism
java.util class libary
tokens
24. Variables and constants can be referenced in any method of the class by declaring at the _________
class level
autoboxing
boolean equalsIgnoreCase (String str)
packages
25. Returns the character at the specified index.
System.out.println
char charAt (int index)
import java.util*
dot operator
26. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.
String replace (char oldChar - char newChar)
Scanner class
enumerated type
java.lang package
27. Methods in the Math class are ______
static
Scanner scan=new Scanner (System.in);
enumerated type
assignment statement
28. Returns a string containing the specified number formatted according to this object's pattern.
Scanner useDelimiter(String pattern)
delimiters
String format (double number)
flow of control
29. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
boolean equalsIgnoreCase (String str)
Understanding
String object
String replace (char oldChar - char newChar)
30. An explicit data value used in a program
instance data
boolean hasNext( )
literal
System.out.println
31. We use an object when we have a _________ to it
int length( )
reference
dot operator
method invocation
32. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.
called method
the "import" declaration
String concat (String str)
visibility modifiers
33. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
string literal
import java.util*
byte nextByte( )
class
34. Represents either a primitive value or an object
private
attributes of an object
support methods
variable name
35. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
string literal
String concat (String str)
data values
36. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
String next( )
behaviors of an object
boolean nextBoolean( )
37. They clarify the role a certain number has in the program.
string name;
instance data
class
constants
38. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location
polymorphism
variable declaration
underscores
not possible
39. When two variables contain the same address and therefore refer to the same object; one important implication of _________ is that when we use one ref to change an object - it is also changed for the other reference because there is really only one o
pointer
wrapper class
promotion
aliases
40. A null reference indicates that a variable does not refer to an object
promotion
java.lang package
int length( )
null
41. Part of the java.util class; picks a number at random out of a range of values.
Random class
char charAt (int index)
double
boolean hasNext( )
42. A ________________ is immutable.
String (String str)
String object
variable
num=Integer.parseInt(str);
43. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
accessor method
String findInLine (String pattern)
import java.util*
44. The names of the parameters in the header of the method declaration
parameter list
the "import" declaration
formal parameters
scope
45. All wrapper classes are defined in ___________
java.lang package
dot operator
arithmetic
parameter list
46. Expressed in a Java program with single quotes
dot operator
character string
a constructor
character literal
47. The classes of the Java standard class library are grouped into __________.
packages
variable
constants
int compareTo (String str)
48. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
accessor method
the DecimalFormat class
instantiation
behaviors of an object
49. Returns the next input token as the indicated type.
assignment
expression
boolean nextBoolean( )
instantiation
50. Before you use a variable __________it
String toLowerCase ( )
Scanner useDelimiter(String pattern)
initialize
attributes of an object