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. 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
literal
inheritance
encapsulation of an object
the DecimalFormat class
2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
prefix form
boolean equals (String str)
return statement
service methods
3. 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.
String object
reserved word void
operations
self-governing
4. An explicit data value used in a program
parameter list
pointer
variable name
literal
5. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
support methods
parameter
behaviors of an object
signed
6. The values passed into a method in an invocation; these are called the arguments to the method
have void
actual parameters
scope
delimiters
7. 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
public
System.out.println
null
higher
8. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
conditional statement
string literal
method
9. When a variable is declared inside a method
import java.util*
local data
parameter
set
10. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
service methods
String replace (char oldChar - char newChar)
constructors
String object
11. All numeric types are _______ - meaning both positive and negative values can be stored in them
String format (double number)
String substring (int offset - int endIndex)
double
signed
12. 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.
encapsulation
delimiters
boolean hasNext( )
parameter list
13. format for constants: all upper-case; separated by ________
underscores
import java.util*
string name;
signed
14. They clarify the role a certain number has in the program.
self-governing
Scanner useDelimiter(String pattern)
local data
constants
15. Boolean type conversions are ___________
not possible
NumberFormat class
null
boolean value
16. Two categories of statements that control the flow of executing through a method: __________ and loops
parameter list
conditionals
inheritance
enumerated type
17. Returns the next input token as a character string.
expression
parameter
method invocation
String next( )
18. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
Random ( )
floating point numbers
higher
inheritance
19. Variables and constants can be referenced in any method of the class by declaring at the _________
String object
byte to short
byte nextByte( )
class level
20. Modifier>type/void>identifier>parameters>method body
method invocation
System.out.println
constructors
method declaration
21. A null reference indicates that a variable does not refer to an object
import java.util*
Scanner useDelimiter(String pattern)
null
class level
22. 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 -
packages
String findInLine (String pattern)
polymorphism
class
23. Returns a new string consisting of this string concatenated with str.
private
promotion
String concat (String str)
parameter
24. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
called method
class library
num=Integer.parseInt(str);
support methods
25. An object has behaviors - which are defined by the ________ associated with that object.
have void
operations
char charAt (int index)
java.lang package
26. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
pointer
floating point numbers
signed
27. Every object has two things: a state and a _____ of behaviors
instance data
public
string literal
set
28. ____________ is instantiated in the traditional way using the new operator.
assignment conversion
String (String str)
the DecimalFormat class
System.out.println
29. Part of the java.util class; picks a number at random out of a range of values.
Random class
String object
expression
promotion
30. 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)
enumerated type
underscores
reference
31. Count++; count--
pointer
postfix form
a constructor
class level
32. Cast operator has _________ precedence to division
actual parameters
instance variable
higher
boolean value
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.
int compareTo (String str)
visibility modifiers
NumberFormat class
String nextLine( )
34. The one that is invoked
called method
RH
reserved word void
encapsulation of an object
35. A ________________ is immutable.
return statement
char charAt (int index)
String object
Understanding
36. A value that is passed into a method when it is invoked
boolean nextBoolean( )
polymorphism
NumberFormat class
parameter
37. ______________ operators have higher precedence
actual parameters
autoboxing
reserved word void
arithmetic
38. Attempts to find the next occurence of the specified pattern - ignoring delimiters
literal
encapsulation of an object
String findInLine (String pattern)
pointer
39. 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
variable declaration
wrapper class
casting
literal
40. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
double
flow of control
operations
the "import" declaration
41. After an object has been instantiated - we set the _________ to access its methods
higher
String toUpperCase ( )
return statement
dot operator
42. Four integer data types: byte - short - int - _____
higher
parentheses
long
variable
43. 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
pointer
class library
System.out.println
formal parameters
44. The act of creating an object using the "new" operator
String format (double number)
byte to short
instantiation
String toUpperCase ( )
45. The automatic conversion between a primitive value and a corresponding wrapper object.
String substring (int offset - int endIndex)
delimiters
autoboxing
support methods
46. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
variable
assignment statement
int compareTo (String str)
Random ( )
47. 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.
String findInLine (String pattern)
String concat (String str)
assignment conversion
enumerated type
48. 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
variable declaration
floating point numbers
encapsulation
attributes of an object
49. Begins with a backslash character ""
long
escape sequences
initialize
postfix form
50. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
class library
expression
instance variable
formal parameters