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. When a variable is declared inside a method
dot operator
local data
conditionals
class
2. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
escape sequences
header of a method
Understanding
3. The declarations of object variables have a similar structure to the declaration of _______________
floating point numbers
primitive variables
initialize
boolean value
4. The act of creating an object using the "new" operator
long
class library
instantiation
java.lang package
5. An explicit data value used in a program
literal
uninitialized variables
behaviors of an object
local data
6. The classes of the Java standard class library are grouped into __________.
string name;
packages
String toUpperCase ( )
byte nextByte( )
7. Constructor: creates a new string object with the same characters as str.
escape sequences
parentheses
visibility modifiers
String (String str)
8. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case
wrapper class
String toLowerCase ( )
String format (double number)
instance data
9. The values passed into a method in an invocation; these are called the arguments to the method
higher
service methods
header of a method
actual parameters
10. 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
aliases
postfix form
reference
NumberFormat class
11. Constructor: creates a new pseudorandom number generator.
variable name
visibility modifiers
Random ( )
header of a method
12. 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
encapsulation
class library
method declaration
attributes of an object
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
service methods
pointer
expression
import java.util*
14. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
class level
boolean value
floating point numbers
char charAt (int index)
15. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
prefix form
a constructor
byte nextByte( )
scope
16. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
delimiters
expression
String (String str)
num=Integer.parseInt(str);
17. Each piece of data that we send to a method
parameter
String concat (String str)
arithmetic
RH
18. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
declared
delimiters
autoboxing
19. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
byte to short
declared
parameter
20. Returns a new string consisting of this string concatenated with str.
double
variable
java.lang package
String concat (String str)
21. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
assignment
RH
support methods
NumberFormat class
22. A set of classes that supports the development of programs
expression
underscores
class library
encapsulation
23. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
dot operator
promotion
byte nextByte( )
24. Returns the number of characters in this stirng.
String replace (char oldChar - char newChar)
int length( )
assignment
arithmetic
25. Begins with a backslash character ""
return statement
escape sequences
import java.util*
boolean nextBoolean( )
26. Modifier>type/void>identifier>parameters>method body
method declaration
mutator method
constants
reserved word void
27. 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
support methods
String findInLine (String pattern)
instantiation
method invocation
28. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
header of a method
assignment statement
instance data
29. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object
enumerated type
string name;
return statement
visibility modifiers
30. All wrapper classes are defined in ___________
java.lang package
RH
int compareTo (String str)
promotion
31. The Scanner class is part of ___________________
variable name
java.util class libary
public
String concat (String str)
32. Returns all input remaining on the current line as a character string.
java.lang package
boolean equals (String str)
variable name
String nextLine( )
33. Declared in a class but not inside any particular method
byte to short
method
instance data
delimiters
34. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
class library
NumberFormat class
class level
boolean nextBoolean( )
35. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
the DecimalFormat class
aliases
encapsulation of an object
service methods
36. Returns the next input token as the indicated type.
String object
boolean nextBoolean( )
conditional statement
called method
37. A value that is passed into a method when it is invoked
String findInLine (String pattern)
mutator method
parameter
java.lang package
38. Sets the scanner's delimiting pattern.
postfix form
System.out.println
parentheses
Scanner useDelimiter(String pattern)
39. Count++; count--
postfix form
polymorphism
conditional statement
initialize
40. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
class level
char charAt (int index)
casting
41. Variables that don't contain any data
variable name
the DecimalFormat class
uninitialized variables
called method
42. Two categories of statements that control the flow of executing through a method: __________ and loops
method declaration
boolean nextBoolean( )
System.out.println
conditionals
43. Returns the next input token as a character string.
method
null
operations
String next( )
44. Variables and constants can be referenced in any method of the class by declaring at the _________
class
NumberFormat class
class level
casting
45. 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.
enumerated type
encapsulation of an object
method invocation
accessor method
46. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
java.lang package
the "import" declaration
static int parseInt (String str)
conditional statement
47. 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
constants
return statement
num=Integer.parseInt(str);
variable declaration
48. Part of the java.util class; picks a number at random out of a range of values.
instance data
self-governing
string name;
Random class
49. The names of the parameters in the header of the method declaration
formal parameters
literal
parameter list
string literal
50. An object has behaviors - which are defined by the ________ associated with that object.
floating point numbers
java.lang package
operations
java.util class libary