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 one that is invoked
called method
operations
header of a method
NumberFormat class
2. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
polymorphism
assignment conversion
state of an object
3. 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
the "import" declaration
parameter list
assignment
4. 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
attributes of an object
assignment
double
state of an object
5. 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.
Scanner class
parameter
private
polymorphism
6. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
prefix form
wrapper class
higher
7. A value that is passed into a method when it is invoked
parameter
assignment statement
initialize
accessor method
8. 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
support methods
instance data
null
9. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.
method declaration
Random class
self-governing
encapsulation
10. 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
System.out.println
Scanner scan=new Scanner (System.in);
String replace (char oldChar - char newChar)
11. 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
dot operator
String replace (char oldChar - char newChar)
return statement
12. Returns the next input token as the indicated type.
instance data
underscores
encapsulation
boolean nextBoolean( )
13. 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.
constructors
boolean equalsIgnoreCase (String str)
double
visibility modifiers
14. All wrapper classes are defined in ___________
escape sequences
String toLowerCase ( )
parameter
java.lang package
15. 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
String concat (String str)
have void
boolean value
Scanner class
16. Returns the character at the specified index.
char charAt (int index)
encapsulation of an object
polymorphism
boolean hasNext( )
17. An explicit data value used in a program
instantiation
declared
literal
java.lang package
18. Expressed in a Java program with single quotes
java.util class libary
class library
character literal
String replace (char oldChar - char newChar)
19. Changes a particular value - e.g.setX - where X is the value they are setting.
set
autoboxing
int length( )
mutator method
20. A variable that refers to an object must be __________
promotion
flow of control
declared
String format (double number)
21. Sets the scanner's delimiting pattern.
null
the DecimalFormat class
Scanner useDelimiter(String pattern)
declared
22. Returns a new string consisting of this string concatenated with str.
variable name
mutator method
boolean equals (String str)
delimiters
23. Returns a new string consisting of this string concatenated with str.
instance data
encapsulation
set
String concat (String str)
24. Every object has two things: a state and a _____ of behaviors
set
Scanner useDelimiter(String pattern)
String nextLine( )
the "import" declaration
25. A name for a location in memory used to hold a data value.
behaviors of an object
String concat (String str)
variable
byte nextByte( )
26. An object has behaviors - which are defined by the ________ associated with that object.
formal parameters
operations
String toLowerCase ( )
string name;
27. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
state of an object
boolean equalsIgnoreCase (String str)
String toLowerCase ( )
28. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
private
instantiation
static
String toUpperCase ( )
29. ______________ operators have higher precedence
byte to short
tokens
arithmetic
wrapper class
30. Begins with a backslash character ""
private
scope
escape sequences
instantiation
31. 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
instance data
System.out.println
inheritance
accessor method
32. Two categories of statements that control the flow of executing through a method: __________ and loops
set
conditionals
self-governing
instance data
33. White space characters such as space characters - tabs - and new lines that separate the elements of input
null
floating point numbers
int length( )
delimiters
34. We use an object when we have a _________ to it
reference
parameter
byte to short
parameter
35. Part of the java.util class; picks a number at random out of a range of values.
uninitialized variables
string name;
Random class
String toLowerCase ( )
36. New memory space is reserved for that variable every time an instance of the class that is created.
parameter
literal
instance data
arithmetic
37. A ________________ is immutable.
byte to short
Scanner useDelimiter(String pattern)
String object
instance data
38. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
actual parameters
encapsulation
parentheses
class level
39. _____ expression evaluated first
RH
not possible
assignment statement
signed
40. Cast operator has _________ precedence to division
variable
higher
arithmetic
RH
41. 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
encapsulation of an object
String (String str)
variable declaration
literal
42. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
support methods
java.util class libary
service methods
encapsulation
43. 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.
byte nextByte( )
instance data
assignment conversion
boolean value
44. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
initialize
packages
header of a method
service methods
45. Returns all input remaining on the current line as a character string.
inheritance
flow of control
String nextLine( )
encapsulation
46. Instance data should be defined with what________ visibility
RH
class library
formal parameters
private
47. The classes of the Java standard class library are grouped into __________.
attributes of an object
packages
behaviors of an object
method
48. Four integer data types: byte - short - int - _____
String toLowerCase ( )
initialize
java.lang package
long
49. 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
Scanner scan=new Scanner (System.in);
String toUpperCase ( )
dot operator
pointer
50. Returns the number of characters in this stirng.
promotion
int length( )
parameter
conditionals