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. The names of the parameters in the header of the method declaration
null
higher
aliases
formal parameters
2. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.
String object
operations
initialize
polymorphism
3. Represents either a primitive value or an object
autoboxing
variable name
character literal
Scanner scan=new Scanner (System.in);
4. The values passed into a method in an invocation; these are called the arguments to the method
encapsulation
actual parameters
scope
primitive variables
5. A null reference indicates that a variable does not refer to an object
null
instance data
packages
self-governing
6. Every object has two things: a state and a _____ of behaviors
boolean hasNext( )
encapsulation of an object
autoboxing
set
7. 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
pointer
String object
variable
string name;
8. 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
NumberFormat class
actual parameters
String replace (char oldChar - char newChar)
expression
9. A variable that refers to an object must be __________
declared
Scanner scan=new Scanner (System.in);
dot operator
boolean equals (String str)
10. Returns all input remaining on the current line as a character string.
java.util class libary
String nextLine( )
promotion
instantiation
11. Variables and constants can be referenced in any method of the class by declaring at the _________
class level
declared
higher
String nextLine( )
12. A class usually provides services to access and modify __________
header of a method
inheritance
Understanding
data values
13. Changes a particular value - e.g.setX - where X is the value they are setting.
actual parameters
formal parameters
Scanner useDelimiter(String pattern)
mutator method
14. After an object has been instantiated - we set the _________ to access its methods
java.lang package
dot operator
header of a method
accessor method
15. An object has behaviors - which are defined by the ________ associated with that object.
constants
operations
String (String str)
enumerated type
16. Returns the number of characters in this stirng.
encapsulation of an object
pointer
int length( )
self-governing
17. Four integer data types: byte - short - int - _____
aliases
conditional statement
long
constructors
18. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.
reserved word void
System.out.println
delimiters
String toUpperCase ( )
19. An object in Java - defined by the class String
wrapper class
accessor method
character string
expression
20. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
static
constructors
self-governing
class library
21. _____ expression evaluated first
RH
assignment
attributes of an object
casting
22. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used
encapsulation of an object
method invocation
expression
aliases
23. Two floating data types: float - _______
uninitialized variables
double
static
private
24. ++count; -- count
import java.util*
String next( )
encapsulation of an object
prefix form
25. Returns the next input token as the indicated type.
conditional statement
escape sequences
string name;
byte nextByte( )
26. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
formal parameters
the "import" declaration
double
underscores
27. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
enumerated type
dot operator
formal parameters
28. Returns the character at the specified index.
char charAt (int index)
not possible
boolean hasNext( )
conditionals
29. The declarations of object variables have a similar structure to the declaration of _______________
a constructor
signed
escape sequences
primitive variables
30. The classes of the Java standard class library are grouped into __________.
method
parameter
packages
boolean equalsIgnoreCase (String str)
31. Constants are ______ because the can't be changed once you use the final modifier
String nextLine( )
public
wrapper class
accessor method
32. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed
escape sequences
local data
support methods
System.out.println
33. ____________ is instantiated in the traditional way using the new operator.
flow of control
the DecimalFormat class
String format (double number)
num=Integer.parseInt(str);
34. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
flow of control
set
behaviors of an object
Understanding
35. An explicit data value used in a program
num=Integer.parseInt(str);
literal
class
String replace (char oldChar - char newChar)
36. Constructor: creates a new pseudorandom number generator.
Random ( )
delimiters
data values
conditional statement
37. Sets the scanner's delimiting pattern.
NumberFormat class
a constructor
not possible
Scanner useDelimiter(String pattern)
38. The act of creating an object using the "new" operator
instantiation
header of a method
packages
java.util class libary
39. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
behaviors of an object
assignment
import java.util*
data values
40. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
flow of control
parentheses
prefix form
state of an object
41. Returns the int corresponding to the value stored in the specified string
encapsulation
primitive variables
String substring (int offset - int endIndex)
static int parseInt (String str)
42. 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
java.lang package
parameter
parentheses
aliases
43. ______________ operators have higher precedence
byte nextByte( )
int compareTo (String str)
method declaration
arithmetic
44. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai
instantiation
string name;
attributes of an object
header of a method
45. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre
higher
inheritance
Scanner useDelimiter(String pattern)
header of a method
46. Methods in the Math class are ______
inheritance
class
int length( )
static
47. 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.
string literal
actual parameters
support methods
parameter list
48. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
class level
Scanner scan=new Scanner (System.in);
constants
49. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
class
attributes of an object
NumberFormat class
String toUpperCase ( )
50. A ________________ is immutable.
public
self-governing
String object
autoboxing