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 act of creating an object using the "new" operator
instantiation
instance data
class
null
2. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
postfix form
string literal
not possible
String substring (int offset - int endIndex)
3. 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.
have void
java.util class libary
constructors
polymorphism
4. The order in which statements are executed in a running program
data values
flow of control
character literal
null
5. Delimited by double quotation characters
conditional statement
string literal
Random ( )
Scanner class
6. Declared in a class but not inside any particular method
method invocation
instance data
inheritance
the DecimalFormat class
7. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
packages
arithmetic
reserved word void
8. When a variable is declared inside a method
self-governing
state of an object
local data
variable
9. format for constants: all upper-case; separated by ________
underscores
String toUpperCase ( )
mutator method
Scanner class
10. Returns a string containing the specified number formatted according to this object's pattern.
variable name
Scanner useDelimiter(String pattern)
scope
String format (double number)
11. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
floating point numbers
int length( )
String replace (char oldChar - char newChar)
12. Sets the scanner's delimiting pattern.
class
Scanner useDelimiter(String pattern)
instance variable
initialize
13. The Scanner class is part of ___________________
return statement
java.util class libary
pointer
String toLowerCase ( )
14. 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 -
assignment conversion
static int parseInt (String str)
class
data values
15. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
long
called method
higher
constructors
16. ____________ is instantiated in the traditional way using the new operator.
character string
the DecimalFormat class
postfix form
called method
17. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
visibility modifiers
int compareTo (String str)
accessor method
string literal
18. We use an object when we have a _________ to it
reference
String (String str)
boolean value
constructors
19. A variable that refers to an object must be __________
String object
class level
declared
character string
20. Changes a particular value - e.g.setX - where X is the value they are setting.
Scanner useDelimiter(String pattern)
instance data
mutator method
instantiation
21. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
method
declared
state of an object
operations
22. 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
primitive variables
visibility modifiers
encapsulation of an object
autoboxing
23. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
character string
initialize
literal
behaviors of an object
24. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
String toLowerCase ( )
instance variable
class library
flow of control
25. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
instance data
accessor method
System.out.println
Scanner useDelimiter(String pattern)
26. They clarify the role a certain number has in the program.
have void
String toLowerCase ( )
constants
expression
27. A ________________ is immutable.
private
Scanner class
String object
actual parameters
28. Every object has two things: a state and a _____ of behaviors
assignment conversion
arithmetic
set
NumberFormat class
29. 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.
NumberFormat class
assignment conversion
behaviors of an object
visibility modifiers
30. Also called a selection statement b/c it allows us to choose which statement will be executed next.
prefix form
String substring (int offset - int endIndex)
uninitialized variables
conditional statement
31. The declarations of object variables have a similar structure to the declaration of _______________
parameter list
String substring (int offset - int endIndex)
encapsulation of an object
primitive variables
32. Before you use a variable __________it
literal
the DecimalFormat class
initialize
conditionals
33. Instance data should be defined with what________ visibility
private
escape sequences
declared
local data
34. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
instantiation
not possible
class
35. White space characters such as space characters - tabs - and new lines that separate the elements of input
literal
string name;
delimiters
assignment conversion
36. A class usually provides services to access and modify __________
header of a method
assignment statement
data values
parameter
37. Widening byte: _________ - to int - to long - to float - to double
import java.util*
char charAt (int index)
byte to short
enumerated type
38. A value that is passed into a method when it is invoked
parameter
prefix form
null
Scanner useDelimiter(String pattern)
39. Returns the next input token as the indicated type.
conditionals
byte nextByte( )
RH
encapsulation
40. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
tokens
boolean equalsIgnoreCase (String str)
the DecimalFormat class
self-governing
41. New memory space is reserved for that variable every time an instance of the class that is created.
literal
instance data
variable name
autoboxing
42. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
floating point numbers
character string
private
43. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
packages
java.lang package
double
String findInLine (String pattern)
44. 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
expression
constructors
behaviors of an object
attributes of an object
45. 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.
assignment conversion
enumerated type
pointer
delimiters
46. 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
boolean value
Scanner scan=new Scanner (System.in);
int length( )
wrapper class
47. 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
Scanner class
variable name
variable
System.out.println
48. The values passed into a method in an invocation; these are called the arguments to the method
wrapper class
support methods
actual parameters
instance data
49. 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.
variable name
self-governing
parentheses
reserved word void
50. Begins with a backslash character ""
escape sequences
formal parameters
variable
conditionals