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. ____________ is instantiated in the traditional way using the new operator.
signed
java.lang package
String (String str)
the DecimalFormat class
2. Represents either a primitive value or an object
byte nextByte( )
assignment
variable name
reference
3. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
reserved word void
Scanner scan=new Scanner (System.in);
character string
4. The one that is invoked
called method
Random class
String format (double number)
parameter list
5. Cast operator has _________ precedence to division
higher
boolean equalsIgnoreCase (String str)
uninitialized variables
parameter
6. Each piece of data that we send to a method
state of an object
polymorphism
parameter
method declaration
7. The declarations of object variables have a similar structure to the declaration of _______________
the DecimalFormat class
delimiters
primitive variables
inheritance
8. Declared in a class but not inside any particular method
actual parameters
instance data
constants
have void
9. Returns all input remaining on the current line as a character string.
pointer
String nextLine( )
constants
dot operator
10. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
pointer
return statement
the "import" declaration
11. 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
state of an object
Random ( )
inheritance
int compareTo (String str)
12. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
class level
variable name
character literal
13. _____ expression evaluated first
RH
class level
service methods
attributes of an object
14. White space characters such as space characters - tabs - and new lines that separate the elements of input
int compareTo (String str)
parameter
delimiters
null
15. A ________________ is immutable.
String next( )
have void
String object
conditional statement
16. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
String format (double number)
state of an object
a constructor
private
17. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
inheritance
String (String str)
service methods
18. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
primitive variables
expression
method invocation
accessor method
19. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
local data
string name;
java.util class libary
20. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
class level
set
delimiters
21. Returns the int corresponding to the value stored in the specified string
String nextLine( )
a constructor
String object
static int parseInt (String str)
22. 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.
encapsulation
variable name
enumerated type
not possible
23. 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.
postfix form
encapsulation
initialize
prefix form
24. A class usually provides services to access and modify __________
data values
have void
encapsulation of an object
assignment conversion
25. A name for a location in memory used to hold a data value.
variable
public
service methods
boolean value
26. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
polymorphism
Scanner useDelimiter(String pattern)
self-governing
constants
27. The Scanner class is part of ___________________
mutator method
Random ( )
accessor method
java.util class libary
28. 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.
assignment conversion
flow of control
boolean equalsIgnoreCase (String str)
class
29. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
accessor method
variable declaration
floating point numbers
Scanner class
30. format for constants: all upper-case; separated by ________
underscores
instance variable
Scanner scan=new Scanner (System.in);
escape sequences
31. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
header of a method
tokens
class library
32. Constructor: creates a new pseudorandom number generator.
uninitialized variables
instance variable
String next( )
Random ( )
33. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
delimiters
boolean equals (String str)
conditionals
java.lang package
34. 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
variable name
Scanner useDelimiter(String pattern)
RH
pointer
35. Returns the number of characters in this stirng.
int length( )
conditionals
char charAt (int index)
long
36. Constructor: creates a new string object with the same characters as str.
Random ( )
RH
character string
String (String str)
37. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
String replace (char oldChar - char newChar)
method declaration
method
38. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
assignment conversion
enumerated type
scope
39. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
polymorphism
boolean equalsIgnoreCase (String str)
Scanner scan=new Scanner (System.in);
flow of control
40. 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
conditionals
Understanding
service methods
41. Returns the next input token as the indicated type.
have void
boolean nextBoolean( )
Random ( )
actual parameters
42. Changes a particular value - e.g.setX - where X is the value they are setting.
scope
visibility modifiers
expression
mutator method
43. sides=10;
num=Integer.parseInt(str);
assignment statement
escape sequences
String findInLine (String pattern)
44. ++count; -- count
prefix form
local data
autoboxing
string literal
45. 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.
higher
flow of control
java.util class libary
reserved word void
46. A method that returns a value must have a _________
inheritance
class
autoboxing
return statement
47. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
state of an object
uninitialized variables
visibility modifiers
48. Returns the next input token as the indicated type.
boolean equalsIgnoreCase (String str)
string literal
System.out.println
byte nextByte( )
49. 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 -
service methods
class
encapsulation
dot operator
50. 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
String substring (int offset - int endIndex)
polymorphism
encapsulation of an object