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. Sets the scanner's delimiting pattern.
literal
Scanner useDelimiter(String pattern)
the "import" declaration
parameter
2. Expressed in a Java program with single quotes
character literal
constructors
NumberFormat class
String toUpperCase ( )
3. All numeric types are _______ - meaning both positive and negative values can be stored in them
encapsulation
boolean equalsIgnoreCase (String str)
mutator method
signed
4. A name for a location in memory used to hold a data value.
mutator method
variable
formal parameters
casting
5. 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
boolean hasNext( )
attributes of an object
Random ( )
System.out.println
6. _____ expression evaluated first
aliases
RH
set
scope
7. 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
parentheses
RH
parameter
wrapper class
8. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
encapsulation of an object
behaviors of an object
Random ( )
escape sequences
9. Cast operator has _________ precedence to division
instantiation
private
not possible
higher
10. Boolean type conversions are ___________
escape sequences
String object
not possible
actual parameters
11. After an object has been instantiated - we set the _________ to access its methods
higher
dot operator
the "import" declaration
boolean value
12. 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
method invocation
constructors
java.lang package
String nextLine( )
13. 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
inheritance
RH
tokens
escape sequences
14. Attempts to find the next occurence of the specified pattern - ignoring delimiters
double
String substring (int offset - int endIndex)
assignment
String findInLine (String pattern)
15. 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
flow of control
parameter
boolean equals (String str)
16. An object has behaviors - which are defined by the ________ associated with that object.
escape sequences
byte to short
operations
String format (double number)
17. A variable that refers to an object must be __________
static int parseInt (String str)
instance data
java.util class libary
declared
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.
scope
the DecimalFormat class
enumerated type
System.out.println
19. 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
called method
instance data
import java.util*
encapsulation of an object
20. Constructor: creates a new string object with the same characters as str.
declared
String (String str)
class library
set
21. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String replace (char oldChar - char newChar)
string literal
primitive variables
visibility modifiers
22. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
parameter
state of an object
scope
aliases
23. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
parameter
boolean equalsIgnoreCase (String str)
Scanner useDelimiter(String pattern)
called method
24. A null reference indicates that a variable does not refer to an object
set
variable
double
null
25. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
tokens
delimiters
character literal
26. Returns the character at the specified index.
boolean value
instance data
assignment
char charAt (int index)
27. 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.
polymorphism
visibility modifiers
conditional statement
support methods
28. 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
service methods
parameter list
method
header of a method
29. Returns true if the scanner has anotehr token in its input.
String (String str)
boolean hasNext( )
byte to short
String toUpperCase ( )
30. Before you use a variable __________it
NumberFormat class
initialize
static
long
31. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
actual parameters
character string
variable
32. Returns a string containing the specified number formatted according to this object's pattern.
actual parameters
casting
a constructor
String format (double number)
33. Delimited by double quotation characters
visibility modifiers
string literal
Scanner useDelimiter(String pattern)
method invocation
34. The automatic conversion between a primitive value and a corresponding wrapper object.
local data
packages
service methods
autoboxing
35. 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
String (String str)
polymorphism
primitive variables
aliases
36. Elements of input
byte to short
long
the "import" declaration
tokens
37. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
int compareTo (String str)
java.lang package
boolean nextBoolean( )
38. Declared in a class but not inside any particular method
scope
String replace (char oldChar - char newChar)
packages
instance data
39. Variables and constants can be referenced in any method of the class by declaring at the _________
null
class level
constants
return statement
40. Every object has two things: a state and a _____ of behaviors
delimiters
called method
String next( )
set
41. Part of the java.util class; picks a number at random out of a range of values.
Random class
constants
variable name
boolean value
42. 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.
byte nextByte( )
string literal
reserved word void
double
43. The act of creating an object using the "new" operator
method
uninitialized variables
char charAt (int index)
instantiation
44. Returns the number of characters in this stirng.
int length( )
String object
boolean value
String toLowerCase ( )
45. Variables that don't contain any data
boolean value
static int parseInt (String str)
string name;
uninitialized variables
46. Each piece of data that we send to a method
string name;
parameter
class
flow of control
47. 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.
String format (double number)
assignment conversion
string name;
class level
48. A set of classes that supports the development of programs
class library
declared
method declaration
NumberFormat class
49. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
Scanner class
constructors
signed
50. This declaration creates a Scanner object that reads input from the keyboard
byte nextByte( )
String (String str)
parameter list
Scanner scan=new Scanner (System.in);