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. 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.
assignment
visibility modifiers
String toUpperCase ( )
actual parameters
2. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
parentheses
attributes of an object
initialize
3. format for constants: all upper-case; separated by ________
class library
int compareTo (String str)
postfix form
underscores
4. After an object has been instantiated - we set the _________ to access its methods
flow of control
instance variable
dot operator
method declaration
5. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
String next( )
static
class level
6. 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.
RH
parameter list
aliases
reference
7. Methods in the Math class are ______
wrapper class
instantiation
static
assignment conversion
8. Returns the character at the specified index.
character string
char charAt (int index)
constructors
underscores
9. Part of the java.util class; picks a number at random out of a range of values.
byte to short
Random class
assignment statement
formal parameters
10. Constructors do not even _______; therefore they cannot return a value.
Random ( )
have void
int compareTo (String str)
instance data
11. 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.
character string
reserved word void
service methods
underscores
12. Changes a particular value - e.g.setX - where X is the value they are setting.
String format (double number)
data values
parameter
mutator method
13. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
autoboxing
reserved word void
constructors
14. A set of classes that supports the development of programs
higher
String concat (String str)
class library
System.out.println
15. 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
operations
double
promotion
pointer
16. 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 replace (char oldChar - char newChar)
Scanner class
instance data
private
17. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
initialize
operations
casting
18. We use an object when we have a _________ to it
RH
Scanner class
reference
method
19. The order in which statements are executed in a running program
wrapper class
flow of control
parameter
import java.util*
20. Boolean type conversions are ___________
Random ( )
not possible
byte to short
boolean value
21. Delimited by double quotation characters
string literal
string name;
higher
System.out.println
22. Elements of input
tokens
higher
double
primitive variables
23. 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
wrapper class
declared
the DecimalFormat class
boolean equalsIgnoreCase (String str)
24. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
reference
a constructor
behaviors of an object
25. _____ expression evaluated first
Scanner class
local data
parameter
RH
26. White space characters such as space characters - tabs - and new lines that separate the elements of input
flow of control
packages
delimiters
String nextLine( )
27. The Scanner class is part of ___________________
signed
inheritance
import java.util*
java.util class libary
28. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
conditional statement
flow of control
primitive variables
29. Constructor: creates a new string object with the same characters as str.
char charAt (int index)
packages
local data
String (String str)
30. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
polymorphism
String toUpperCase ( )
called method
accessor method
31. 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
postfix form
assignment statement
set
32. 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
string name;
System.out.println
String (String str)
header of a method
33. A null reference indicates that a variable does not refer to an object
return statement
null
String next( )
String object
34. Constructor: creates a new pseudorandom number generator.
delimiters
boolean nextBoolean( )
instance data
Random ( )
35. Instance data should be defined with what________ visibility
character literal
variable
private
static int parseInt (String str)
36. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
variable declaration
self-governing
String toUpperCase ( )
actual parameters
37. Every object has two things: a state and a _____ of behaviors
set
floating point numbers
String object
assignment statement
38. Variables that don't contain any data
uninitialized variables
Random class
parameter
conditionals
39. New memory space is reserved for that variable every time an instance of the class that is created.
behaviors of an object
instance data
boolean equals (String str)
private
40. Two floating data types: float - _______
java.util class libary
String (String str)
String concat (String str)
double
41. Returns all input remaining on the current line as a character string.
self-governing
formal parameters
String nextLine( )
method
42. An object has behaviors - which are defined by the ________ associated with that object.
header of a method
method
null
operations
43. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
behaviors of an object
packages
character literal
44. 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
System.out.println
self-governing
inheritance
45. ______________ operators have higher precedence
higher
arithmetic
string literal
operations
46. When a variable is declared inside a method
local data
actual parameters
header of a method
primitive variables
47. Four integer data types: byte - short - int - _____
System.out.println
method declaration
a constructor
long
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
String next( )
variable declaration
String substring (int offset - int endIndex)
System.out.println
49. 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
floating point numbers
java.lang package
postfix form
50. Returns the number of characters in this stirng.
class
reference
int length( )
delimiters