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. 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
packages
a constructor
casting
parentheses
2. 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
data values
aliases
int length( )
arithmetic
3. Also called a selection statement b/c it allows us to choose which statement will be executed next.
behaviors of an object
autoboxing
polymorphism
conditional statement
4. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
delimiters
static
casting
instance variable
5. An object in Java - defined by the class String
actual parameters
signed
casting
character string
6. 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
import java.util*
flow of control
String toUpperCase ( )
7. format for constants: all upper-case; separated by ________
underscores
constructors
constants
int compareTo (String str)
8. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
method declaration
the "import" declaration
arithmetic
constructors
9. 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
Scanner useDelimiter(String pattern)
encapsulation of an object
RH
import java.util*
10. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
wrapper class
header of a method
static int parseInt (String str)
class
11. Begins with a backslash character ""
escape sequences
static int parseInt (String str)
private
String findInLine (String pattern)
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
declared
Understanding
data values
long
13. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double
casting
state of an object
constructors
tokens
14. When a variable is declared inside a method
local data
enumerated type
inheritance
visibility modifiers
15. 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
literal
primitive variables
wrapper class
16. Two floating data types: float - _______
boolean hasNext( )
primitive variables
double
instance variable
17. 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
return statement
prefix form
string name;
int compareTo (String str)
18. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
class
RH
constructors
service methods
19. An explicit data value used in a program
literal
RH
static
assignment statement
20. Returns the character at the specified index.
constants
char charAt (int index)
String toUpperCase ( )
visibility modifiers
21. 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
method
String next( )
instance data
packages
22. Constants are ______ because the can't be changed once you use the final modifier
behaviors of an object
character literal
polymorphism
public
23. ______________ operators have higher precedence
arithmetic
import java.util*
literal
conditionals
24. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
header of a method
int compareTo (String str)
boolean hasNext( )
NumberFormat class
25. 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
byte to short
instantiation
import java.util*
attributes of an object
26. The one that is invoked
String format (double number)
reserved word void
called method
expression
27. Returns true if the scanner has anotehr token in its input.
String format (double number)
byte to short
boolean hasNext( )
parameter
28. Expressed in a Java program with single quotes
character literal
parameter
packages
local data
29. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
instance variable
RH
String substring (int offset - int endIndex)
flow of control
30. Returns the next input token as a character string.
String next( )
Scanner useDelimiter(String pattern)
reserved word void
string literal
31. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
String toLowerCase ( )
System.out.println
static
32. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
signed
inheritance
the "import" declaration
33. Changes a particular value - e.g.setX - where X is the value they are setting.
import java.util*
mutator method
higher
reference
34. 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
character literal
method invocation
promotion
class
35. _____ expression evaluated first
enumerated type
RH
reserved word void
mutator method
36. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
assignment
boolean value
character literal
floating point numbers
37. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -
NumberFormat class
class
state of an object
have void
38. Delimited by double quotation characters
initialize
parameter list
Scanner scan=new Scanner (System.in);
string literal
39. Elements of input
tokens
assignment
java.lang package
boolean equalsIgnoreCase (String str)
40. The names of the parameters in the header of the method declaration
formal parameters
support methods
variable
int length( )
41. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
autoboxing
initialize
a constructor
42. Part of the java.util class; picks a number at random out of a range of values.
Random class
String format (double number)
NumberFormat class
accessor method
43. A null reference indicates that a variable does not refer to an object
null
Random class
boolean hasNext( )
called method
44. 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
byte nextByte( )
parameter
NumberFormat class
inheritance
45. An object has behaviors - which are defined by the ________ associated with that object.
instance data
parameter list
primitive variables
operations
46. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
signed
method declaration
variable declaration
parentheses
47. The order in which statements are executed in a running program
long
assignment statement
String toUpperCase ( )
flow of control
48. Returns a string containing the specified number formatted according to this object's pattern.
Random class
class library
assignment
String format (double number)
49. All wrapper classes are defined in ___________
uninitialized variables
character literal
promotion
java.lang package
50. Returns the number of characters in this stirng.
called method
visibility modifiers
int length( )
boolean value