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. Constructor: creates a new pseudorandom number generator.
signed
Random ( )
static int parseInt (String str)
a constructor
2. A method that returns a value must have a _________
return statement
declared
NumberFormat class
a constructor
3. Elements of input
string name;
behaviors of an object
tokens
flow of control
4. 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
the "import" declaration
conditionals
pointer
5. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
uninitialized variables
mutator method
NumberFormat class
variable name
6. 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
boolean hasNext( )
conditional statement
pointer
header of a method
7. All wrapper classes are defined in ___________
String next( )
postfix form
java.lang package
assignment statement
8. A name for a location in memory used to hold a data value.
variable
Understanding
called method
String toLowerCase ( )
9. The declarations of object variables have a similar structure to the declaration of _______________
System.out.println
byte to short
primitive variables
escape sequences
10. 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
boolean equals (String str)
java.lang package
String object
encapsulation of an object
11. 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
java.lang package
String replace (char oldChar - char newChar)
postfix form
System.out.println
12. We use an object when we have a _________ to it
actual parameters
the "import" declaration
Scanner scan=new Scanner (System.in);
reference
13. 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.
self-governing
String format (double number)
encapsulation of an object
assignment conversion
14. Returns the next input token as a character string.
String next( )
dot operator
actual parameters
encapsulation
15. The one that is invoked
import java.util*
wrapper class
called method
instance data
16. Variables that don't contain any data
String format (double number)
uninitialized variables
boolean equals (String str)
operations
17. Returns the character at the specified index.
null
String concat (String str)
escape sequences
char charAt (int index)
18. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
promotion
encapsulation of an object
String object
19. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
assignment statement
behaviors of an object
class level
reserved word void
20. A variable that refers to an object must be __________
literal
declared
actual parameters
private
21. ++count; -- count
long
boolean equalsIgnoreCase (String str)
promotion
prefix form
22. When a variable is declared inside a method
signed
local data
character literal
import java.util*
23. Also called a selection statement b/c it allows us to choose which statement will be executed next.
delimiters
conditional statement
arithmetic
a constructor
24. 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.
class library
String replace (char oldChar - char newChar)
support methods
visibility modifiers
25. The classes of the Java standard class library are grouped into __________.
local data
enumerated type
packages
promotion
26. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double
casting
method declaration
behaviors of an object
service methods
27. The Scanner class is part of ___________________
arithmetic
String substring (int offset - int endIndex)
java.util class libary
variable
28. 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.
class library
scope
variable
encapsulation
29. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
actual parameters
the "import" declaration
variable declaration
expression
30. Instance data should be defined with what________ visibility
packages
private
Scanner useDelimiter(String pattern)
String (String str)
31. 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
constructors
java.lang package
Scanner class
behaviors of an object
32. Constructor: creates a new string object with the same characters as str.
String format (double number)
constructors
String (String str)
aliases
33. Returns a new string consisting of this string concatenated with str.
floating point numbers
String concat (String str)
class library
boolean value
34. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
attributes of an object
reserved word void
delimiters
floating point numbers
35. 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
visibility modifiers
wrapper class
String nextLine( )
literal
36. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data
parameter
String findInLine (String pattern)
expression
scope
37. Each piece of data that we send to a method
parentheses
parameter
class level
String format (double number)
38. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
self-governing
initialize
support methods
39. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
attributes of an object
self-governing
aliases
autoboxing
40. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
System.out.println
String replace (char oldChar - char newChar)
static int parseInt (String str)
41. 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
boolean value
casting
mutator method
instance data
42. Count++; count--
String replace (char oldChar - char newChar)
service methods
Scanner scan=new Scanner (System.in);
postfix form
43. After an object has been instantiated - we set the _________ to access its methods
System.out.println
long
Scanner class
dot operator
44. Every object has two things: a state and a _____ of behaviors
String nextLine( )
set
casting
Scanner class
45. A ________________ is immutable.
wrapper class
int compareTo (String str)
method
String object
46. Two floating data types: float - _______
java.util class libary
enumerated type
parentheses
double
47. All numeric types are _______ - meaning both positive and negative values can be stored in them
prefix form
signed
state of an object
method
48. A null reference indicates that a variable does not refer to an object
byte nextByte( )
expression
null
assignment
49. Returns a new string consisting of this string concatenated with str.
enumerated type
pointer
boolean equals (String str)
String toUpperCase ( )
50. Cast operator has _________ precedence to division
higher
constructors
num=Integer.parseInt(str);
behaviors of an object