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 only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
boolean equals (String str)
support methods
String (String str)
header of a method
2. ______________ operators have higher precedence
arithmetic
Scanner useDelimiter(String pattern)
boolean equalsIgnoreCase (String str)
class level
3. 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
byte to short
the DecimalFormat class
conditionals
expression
4. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.
assignment conversion
Understanding
service methods
string literal
5. sides=10;
assignment statement
floating point numbers
the "import" declaration
called method
6. Returns the next input token as the indicated type.
assignment statement
signed
parameter
boolean nextBoolean( )
7. Widening byte: _________ - to int - to long - to float - to double
Random ( )
conditionals
String substring (int offset - int endIndex)
byte to short
8. A null reference indicates that a variable does not refer to an object
null
parentheses
String findInLine (String pattern)
String substring (int offset - int endIndex)
9. Four integer data types: byte - short - int - _____
delimiters
long
boolean equals (String str)
instance data
10. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
initialize
encapsulation of an object
floating point numbers
method invocation
11. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
class library
higher
return statement
12. 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
dot operator
Understanding
promotion
variable name
13. The act of creating an object using the "new" operator
constructors
return statement
import java.util*
instantiation
14. 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.
boolean value
Random class
assignment statement
scope
15. 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
inheritance
java.lang package
Scanner useDelimiter(String pattern)
16. Two floating data types: float - _______
double
boolean value
Random ( )
instance variable
17. Constructor: creates a new string object with the same characters as str.
Scanner class
byte to short
expression
String (String str)
18. 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.
tokens
boolean nextBoolean( )
enumerated type
the DecimalFormat class
19. Returns all input remaining on the current line as a character string.
String nextLine( )
static int parseInt (String str)
parameter list
header of a method
20. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
operations
visibility modifiers
static
boolean equalsIgnoreCase (String str)
21. 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.
packages
static
polymorphism
have void
22. Constants are ______ because the can't be changed once you use the final modifier
public
parameter
flow of control
static
23. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
support methods
behaviors of an object
postfix form
Scanner useDelimiter(String pattern)
24. A method that returns a value must have a _________
expression
return statement
tokens
encapsulation of an object
25. After an object has been instantiated - we set the _________ to access its methods
inheritance
System.out.println
dot operator
not possible
26. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
aliases
String toUpperCase ( )
String concat (String str)
postfix form
27. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
mutator method
uninitialized variables
enumerated type
the "import" declaration
28. 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
the "import" declaration
packages
java.util class libary
pointer
29. Returns a new string consisting of this string concatenated with str.
floating point numbers
mutator method
boolean equalsIgnoreCase (String str)
String concat (String str)
30. Returns the next input token as a character string.
String next( )
parameter
promotion
java.lang package
31. Returns the character at the specified index.
char charAt (int index)
attributes of an object
uninitialized variables
instantiation
32. A variable that refers to an object must be __________
parentheses
class level
declared
Scanner class
33. ____________ is instantiated in the traditional way using the new operator.
class library
static
expression
the DecimalFormat class
34. The declarations of object variables have a similar structure to the declaration of _______________
visibility modifiers
primitive variables
header of a method
escape sequences
35. Methods in the Math class are ______
mutator method
static
signed
int length( )
36. White space characters such as space characters - tabs - and new lines that separate the elements of input
the "import" declaration
delimiters
behaviors of an object
char charAt (int index)
37. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
variable name
scope
import java.util*
boolean equals (String str)
38. ++count; -- count
encapsulation of an object
wrapper class
prefix form
the DecimalFormat class
39. The classes of the Java standard class library are grouped into __________.
conditional statement
behaviors of an object
local data
packages
40. 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
conditional statement
char charAt (int index)
encapsulation of an object
String format (double number)
41. Also called a selection statement b/c it allows us to choose which statement will be executed next.
constants
conditional statement
state of an object
initialize
42. Variables and constants can be referenced in any method of the class by declaring at the _________
class level
casting
primitive variables
String toLowerCase ( )
43. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
tokens
parameter
accessor method
static int parseInt (String str)
44. _____ expression evaluated first
autoboxing
RH
called method
variable name
45. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially
a constructor
method
long
String toUpperCase ( )
46. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
NumberFormat class
parentheses
expression
String object
47. Changes a particular value - e.g.setX - where X is the value they are setting.
the "import" declaration
mutator method
String (String str)
instantiation
48. The order in which statements are executed in a running program
formal parameters
flow of control
visibility modifiers
instance variable
49. Returns a string containing the specified number formatted according to this object's pattern.
class
String format (double number)
actual parameters
signed
50. A class usually provides services to access and modify __________
reserved word void
public
data values
encapsulation of an object