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. White space characters such as space characters - tabs - and new lines that separate the elements of input
a constructor
delimiters
floating point numbers
null
2. 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
Scanner class
return statement
the "import" declaration
local data
3. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
local data
declared
import java.util*
String concat (String str)
4. Sets the scanner's delimiting pattern.
variable
Scanner useDelimiter(String pattern)
parameter
private
5. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
not possible
actual parameters
self-governing
polymorphism
6. Represents either a primitive value or an object
num=Integer.parseInt(str);
variable name
java.util class libary
instance variable
7. Part of the java.util class; picks a number at random out of a range of values.
instantiation
scope
Random class
inheritance
8. sides=10;
Scanner scan=new Scanner (System.in);
assignment statement
parameter
parameter list
9. _____ expression evaluated first
byte nextByte( )
RH
parameter
Scanner useDelimiter(String pattern)
10. Four integer data types: byte - short - int - _____
static
constants
byte nextByte( )
long
11. We use an object when we have a _________ to it
reference
String (String str)
instance variable
Understanding
12. Returns the next input token as a character string.
Scanner useDelimiter(String pattern)
Understanding
character literal
String next( )
13. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
string literal
service methods
state of an object
escape sequences
14. Begins with a backslash character ""
String toLowerCase ( )
parameter
escape sequences
dot operator
15. An explicit data value used in a program
called method
literal
String nextLine( )
num=Integer.parseInt(str);
16. The declarations of object variables have a similar structure to the declaration of _______________
boolean equalsIgnoreCase (String str)
delimiters
public
primitive variables
17. Returns all input remaining on the current line as a character string.
have void
mutator method
String nextLine( )
public
18. After an object has been instantiated - we set the _________ to access its methods
called method
boolean equals (String str)
dot operator
uninitialized variables
19. Three ways in which Java conversions occur: _________ conversion - promotion - casting
called method
assignment
boolean nextBoolean( )
string name;
20. 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 of an object
enumerated type
not possible
higher
21. Two floating data types: float - _______
String toUpperCase ( )
formal parameters
double
encapsulation of an object
22. 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)
uninitialized variables
higher
conditional statement
23. 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
encapsulation
primitive variables
string name;
aliases
24. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
boolean nextBoolean( )
instance data
String findInLine (String pattern)
25. A null reference indicates that a variable does not refer to an object
int length( )
null
mutator method
long
26. Expressed in a Java program with single quotes
public
inheritance
character literal
autoboxing
27. 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.
literal
visibility modifiers
boolean equalsIgnoreCase (String str)
String (String str)
28. Returns the next input token as the indicated type.
long
actual parameters
boolean nextBoolean( )
primitive variables
29. 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:
delimiters
dot operator
called method
num=Integer.parseInt(str);
30. Variables that don't contain any data
java.util class libary
constants
uninitialized variables
set
31. Returns a new string consisting of this string concatenated with str.
String concat (String str)
return statement
System.out.println
int compareTo (String str)
32. Instance data should be defined with what________ visibility
private
String format (double number)
int compareTo (String str)
tokens
33. Returns a string containing the specified number formatted according to this object's pattern.
string name;
class library
String format (double number)
long
34. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
scope
assignment conversion
a constructor
Random ( )
35. Modifier>type/void>identifier>parameters>method body
have void
literal
method declaration
public
36. A value that is passed into a method when it is invoked
not possible
parameter
uninitialized variables
variable declaration
37. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
polymorphism
parentheses
actual parameters
variable name
38. 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 -
class
instance data
byte nextByte( )
encapsulation
39. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
encapsulation of an object
class
promotion
inheritance
40. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
class library
behaviors of an object
public
higher
41. 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.
attributes of an object
Scanner useDelimiter(String pattern)
declared
parameter list
42. Methods in the Math class are ______
RH
assignment statement
parentheses
static
43. The one that is invoked
assignment
called method
the DecimalFormat class
autoboxing
44. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
packages
boolean equalsIgnoreCase (String str)
parameter list
String findInLine (String pattern)
45. Count++; count--
postfix form
char charAt (int index)
character literal
int compareTo (String str)
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
tokens
static
wrapper class
java.util class libary
47. Constructor: creates a new pseudorandom number generator.
postfix form
Random ( )
method
reference
48. 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
aliases
Understanding
static
class library
49. 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
String replace (char oldChar - char newChar)
expression
attributes of an object
conditionals
50. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
visibility modifiers
java.lang package
String replace (char oldChar - char newChar)