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. Sets the scanner's delimiting pattern.
character string
Scanner useDelimiter(String pattern)
byte nextByte( )
parameter
2. 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
wrapper class
operations
byte nextByte( )
boolean value
3. Every object has two things: a state and a _____ of behaviors
num=Integer.parseInt(str);
class
not possible
set
4. Modifier>type/void>identifier>parameters>method body
method declaration
the "import" declaration
instance data
reserved word void
5. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
variable name
String toUpperCase ( )
operations
parameter
6. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
accessor method
import java.util*
higher
parameter
7. 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
flow of control
String nextLine( )
long
System.out.println
8. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
higher
promotion
flow of control
9. 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
encapsulation of an object
static int parseInt (String str)
Understanding
boolean nextBoolean( )
10. Also called a selection statement b/c it allows us to choose which statement will be executed next.
operations
uninitialized variables
data values
conditional statement
11. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
packages
parameter
NumberFormat class
encapsulation of an object
12. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
aliases
not possible
the "import" declaration
13. Two categories of statements that control the flow of executing through a method: __________ and loops
parentheses
RH
conditionals
state of an object
14. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
scope
attributes of an object
self-governing
pointer
15. The declarations of object variables have a similar structure to the declaration of _______________
java.util class libary
String concat (String str)
String next( )
primitive variables
16. A method that returns a value must have a _________
actual parameters
called method
String concat (String str)
return statement
17. Variables that don't contain any data
assignment statement
null
flow of control
uninitialized variables
18. 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
uninitialized variables
a constructor
parentheses
expression
19. The Scanner class is part of ___________________
java.util class libary
enumerated type
pointer
the DecimalFormat class
20. Elements of input
header of a method
tokens
NumberFormat class
behaviors of an object
21. Boolean type conversions are ___________
java.lang package
not possible
boolean nextBoolean( )
String nextLine( )
22. When a variable is declared inside a method
operations
local data
Scanner scan=new Scanner (System.in);
method invocation
23. The order in which statements are executed in a running program
higher
flow of control
data values
instance data
24. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
higher
String substring (int offset - int endIndex)
service methods
String (String str)
25. Cast operator has _________ precedence to division
instance data
higher
behaviors of an object
actual parameters
26. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
variable
mutator method
instance data
boolean equalsIgnoreCase (String str)
27. ______________ operators have higher precedence
java.lang package
parentheses
int compareTo (String str)
arithmetic
28. The one that is invoked
accessor method
called method
the DecimalFormat class
int length( )
29. The classes of the Java standard class library are grouped into __________.
parentheses
double
escape sequences
packages
30. Before you use a variable __________it
NumberFormat class
java.lang package
initialize
conditional statement
31. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
reserved word void
Random ( )
String next( )
service methods
32. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
mutator method
expression
char charAt (int index)
33. Returns the next input token as the indicated type.
boolean equalsIgnoreCase (String str)
formal parameters
String next( )
byte nextByte( )
34. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
called method
String findInLine (String pattern)
postfix form
parentheses
35. 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
Scanner useDelimiter(String pattern)
attributes of an object
class
int compareTo (String str)
36. All numeric types are _______ - meaning both positive and negative values can be stored in them
assignment conversion
uninitialized variables
state of an object
signed
37. 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
not possible
visibility modifiers
Scanner useDelimiter(String pattern)
38. Returns the next input token as a character string.
String next( )
primitive variables
NumberFormat class
public
39. 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
visibility modifiers
aliases
boolean nextBoolean( )
RH
40. Widening byte: _________ - to int - to long - to float - to double
state of an object
long
class level
byte to short
41. Four integer data types: byte - short - int - _____
packages
long
string literal
attributes of an object
42. 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.
num=Integer.parseInt(str);
assignment conversion
actual parameters
attributes of an object
43. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
encapsulation of an object
variable
parameter
44. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
boolean hasNext( )
public
local data
45. After an object has been instantiated - we set the _________ to access its methods
wrapper class
String toUpperCase ( )
dot operator
uninitialized variables
46. A variable that refers to an object must be __________
declared
postfix form
System.out.println
RH
47. Constructor: creates a new pseudorandom number generator.
Random ( )
System.out.println
packages
String replace (char oldChar - char newChar)
48. 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.
boolean hasNext( )
byte nextByte( )
class level
reserved word void
49. Constructors do not even _______; therefore they cannot return a value.
variable name
have void
variable
floating point numbers
50. A ________________ is immutable.
String object
class
aliases
boolean hasNext( )