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. Returns the next input token as a character string.
self-governing
polymorphism
String next( )
String object
2. 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
enumerated type
instance data
initialize
attributes of an object
3. Every object has two things: a state and a _____ of behaviors
set
null
parameter
delimiters
4. A value that is passed into a method when it is invoked
tokens
String next( )
parameter
floating point numbers
5. We use an object when we have a _________ to it
variable name
method invocation
String replace (char oldChar - char newChar)
reference
6. 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
attributes of an object
Scanner useDelimiter(String pattern)
enumerated type
casting
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
actual parameters
String findInLine (String pattern)
int length( )
pointer
8. _____ expression evaluated first
method declaration
byte to short
floating point numbers
RH
9. Before you use a variable __________it
flow of control
conditionals
initialize
visibility modifiers
10. The order in which statements are executed in a running program
method
declared
boolean hasNext( )
flow of control
11. 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
String next( )
encapsulation of an object
flow of control
tokens
12. Two categories of statements that control the flow of executing through a method: __________ and loops
promotion
private
declared
conditionals
13. Declared in a class but not inside any particular method
header of a method
instance data
boolean hasNext( )
long
14. Boolean type conversions are ___________
not possible
assignment conversion
the "import" declaration
inheritance
15. Changes a particular value - e.g.setX - where X is the value they are setting.
have void
instance data
method invocation
mutator method
16. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can
Scanner class
declared
String nextLine( )
reserved word void
17. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off
byte to short
aliases
boolean value
reference
18. Each piece of data that we send to a method
postfix form
parameter
local data
accessor method
19. New memory space is reserved for that variable every time an instance of the class that is created.
Random ( )
instance data
flow of control
java.lang package
20. ____________ is instantiated in the traditional way using the new operator.
method invocation
the DecimalFormat class
Scanner useDelimiter(String pattern)
data values
21. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
private
String toUpperCase ( )
char charAt (int index)
signed
22. 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
String object
string name;
method
boolean equals (String str)
23. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
java.lang package
Scanner scan=new Scanner (System.in);
import java.util*
parameter list
24. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
a constructor
Understanding
data values
String replace (char oldChar - char newChar)
25. The one that is invoked
called method
int compareTo (String str)
inheritance
expression
26. 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
null
variable name
wrapper class
mutator method
27. The names of the parameters in the header of the method declaration
formal parameters
parentheses
reference
encapsulation of an object
28. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
parameter list
boolean equalsIgnoreCase (String str)
instance variable
aliases
29. The values passed into a method in an invocation; these are called the arguments to the method
actual parameters
not possible
string name;
prefix form
30. A ________________ is immutable.
String object
double
assignment
method invocation
31. All wrapper classes are defined in ___________
have void
java.lang package
visibility modifiers
service methods
32. Four integer data types: byte - short - int - _____
public
long
promotion
int length( )
33. 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.
visibility modifiers
variable declaration
class level
autoboxing
34. Also called a selection statement b/c it allows us to choose which statement will be executed next.
mutator method
conditional statement
String substring (int offset - int endIndex)
flow of control
35. Cast operator has _________ precedence to division
java.lang package
instance variable
prefix form
higher
36. ++count; -- count
have void
prefix form
local data
num=Integer.parseInt(str);
37. 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.
state of an object
not possible
parameter list
assignment conversion
38. White space characters such as space characters - tabs - and new lines that separate the elements of input
num=Integer.parseInt(str);
String nextLine( )
visibility modifiers
delimiters
39. 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
instance data
parentheses
constants
40. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
return statement
class level
attributes of an object
floating point numbers
41. Two floating data types: float - _______
double
byte to short
private
Scanner class
42. Count++; count--
reserved word void
state of an object
String nextLine( )
postfix form
43. 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.
assignment
num=Integer.parseInt(str);
polymorphism
formal parameters
44. Constructor: creates a new pseudorandom number generator.
string literal
a constructor
Random ( )
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
String (String str)
variable
encapsulation of an object
inheritance
46. An object has behaviors - which are defined by the ________ associated with that object.
the DecimalFormat class
operations
byte nextByte( )
int length( )
47. Instance data should be defined with what________ visibility
variable name
private
Scanner scan=new Scanner (System.in);
class library
48. Widening byte: _________ - to int - to long - to float - to double
declared
instance data
byte to short
char charAt (int index)
49. format for constants: all upper-case; separated by ________
RH
underscores
instance data
behaviors of an object
50. The declarations of object variables have a similar structure to the declaration of _______________
String format (double number)
primitive variables
the DecimalFormat class
parameter list