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 declarations of object variables have a similar structure to the declaration of _______________
primitive variables
public
boolean equals (String str)
reference
2. The classes of the Java standard class library are grouped into __________.
double
packages
parameter list
return statement
3. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
conditionals
tokens
boolean equalsIgnoreCase (String str)
4. Returns all input remaining on the current line as a character string.
parameter list
String nextLine( )
java.lang package
java.util class libary
5. Returns the next input token as the indicated type.
byte nextByte( )
java.util class libary
Random class
encapsulation
6. A name for a location in memory used to hold a data value.
class
Random ( )
variable
private
7. A ________________ is immutable.
String object
RH
String next( )
inheritance
8. Variables that don't contain any data
variable
string name;
tokens
uninitialized variables
9. They clarify the role a certain number has in the program.
the "import" declaration
literal
behaviors of an object
constants
10. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai
not possible
attributes of an object
pointer
visibility modifiers
11. The one that is invoked
class library
uninitialized variables
service methods
called method
12. Count++; count--
parentheses
postfix form
encapsulation
conditional statement
13. Variables and constants can be referenced in any method of the class by declaring at the _________
assignment statement
class level
service methods
scope
14. Expressed in a Java program with single quotes
character literal
constructors
NumberFormat class
service methods
15. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
tokens
static int parseInt (String str)
autoboxing
parentheses
16. Returns a string containing the specified number formatted according to this object's pattern.
NumberFormat class
String format (double number)
character literal
service methods
17. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
literal
String findInLine (String pattern)
prefix form
state of an object
18. A variable that refers to an object must be __________
System.out.println
conditionals
declared
parentheses
19. _____ expression evaluated first
operations
RH
double
declared
20. An object has behaviors - which are defined by the ________ associated with that object.
null
byte to short
operations
pointer
21. 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
boolean hasNext( )
aliases
RH
class
22. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
RH
casting
Random ( )
NumberFormat class
23. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
assignment statement
header of a method
escape sequences
conditional statement
24. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
num=Integer.parseInt(str);
self-governing
operations
boolean equalsIgnoreCase (String str)
25. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
set
String replace (char oldChar - char newChar)
Understanding
floating point numbers
26. All wrapper classes are defined in ___________
boolean nextBoolean( )
constructors
java.lang package
return statement
27. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
RH
String nextLine( )
boolean equalsIgnoreCase (String str)
28. The values passed into a method in an invocation; these are called the arguments to the method
string literal
parentheses
actual parameters
character string
29. Constants are ______ because the can't be changed once you use the final modifier
int compareTo (String str)
initialize
public
java.lang package
30. A value that is passed into a method when it is invoked
java.lang package
int compareTo (String str)
parameter
floating point numbers
31. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
class level
packages
String object
32. Sets the scanner's delimiting pattern.
mutator method
character literal
Scanner useDelimiter(String pattern)
inheritance
33. Returns true if the scanner has anotehr token in its input.
conditional statement
boolean hasNext( )
method invocation
boolean equalsIgnoreCase (String str)
34. 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.
Scanner class
instance variable
declared
parameter list
35. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
casting
the "import" declaration
boolean equalsIgnoreCase (String str)
36. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
public
autoboxing
support methods
behaviors of an object
37. All numeric types are _______ - meaning both positive and negative values can be stored in them
byte to short
instance data
signed
delimiters
38. Constructors do not even _______; therefore they cannot return a value.
support methods
java.util class libary
have void
String concat (String str)
39. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
long
parameter
constants
promotion
40. 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
have void
double
import java.util*
41. 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
String nextLine( )
string name;
parentheses
42. Methods in the Math class are ______
String replace (char oldChar - char newChar)
static
underscores
constants
43. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
null
expression
boolean nextBoolean( )
44. 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
String format (double number)
boolean equalsIgnoreCase (String str)
postfix form
45. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
polymorphism
uninitialized variables
tokens
constructors
46. 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
Scanner scan=new Scanner (System.in);
variable declaration
class
import java.util*
47. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
null
instance variable
string name;
char charAt (int index)
48. 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
constants
int compareTo (String str)
autoboxing
System.out.println
49. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off
self-governing
String toUpperCase ( )
boolean value
arithmetic
50. After an object has been instantiated - we set the _________ to access its methods
string literal
dot operator
escape sequences
assignment conversion