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
25
questions in
10 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. 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
boolean nextBoolean( )
return statement
reserved word void
2. 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:
boolean equalsIgnoreCase (String str)
parameter
num=Integer.parseInt(str);
variable
3. Count++; count--
expression
parameter
postfix form
underscores
4. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre
inheritance
formal parameters
polymorphism
string name;
5. Every object has two things: a state and a _____ of behaviors
primitive variables
set
postfix form
boolean value
6. A ________________ is immutable.
primitive variables
have void
String object
NumberFormat class
7. Returns the next input token as the indicated type.
variable name
System.out.println
formal parameters
boolean nextBoolean( )
8. After an object has been instantiated - we set the _________ to access its methods
promotion
uninitialized variables
initialize
dot operator
9. All wrapper classes are defined in ___________
character literal
int length( )
boolean equals (String str)
java.lang package
10. Four integer data types: byte - short - int - _____
behaviors of an object
long
Scanner scan=new Scanner (System.in);
private
11. Two categories of statements that control the flow of executing through a method: __________ and loops
variable name
actual parameters
postfix form
conditionals
12. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
static
a constructor
assignment
13. Returns a string containing the specified number formatted according to this object's pattern.
tokens
the DecimalFormat class
character string
String format (double number)
14. The order in which statements are executed in a running program
flow of control
static
behaviors of an object
parameter list
15. Constants are ______ because the can't be changed once you use the final modifier
flow of control
char charAt (int index)
public
import java.util*
16. Also called a selection statement b/c it allows us to choose which statement will be executed next.
num=Integer.parseInt(str);
variable name
String findInLine (String pattern)
conditional statement
17. 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
conditionals
aliases
parentheses
initialize
18. 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
System.out.println
postfix form
the DecimalFormat class
reserved word void
19. 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
instance data
Random class
a constructor
variable declaration
20. Variables and constants can be referenced in any method of the class by declaring at the _________
String format (double number)
assignment conversion
boolean equalsIgnoreCase (String str)
class level
21. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
conditional statement
boolean nextBoolean( )
instance variable
Scanner scan=new Scanner (System.in);
22. Returns true if the scanner has anotehr token in its input.
int compareTo (String str)
instance variable
private
boolean hasNext( )
23. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
String nextLine( )
static int parseInt (String str)
null
header of a method
24. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
visibility modifiers
String toUpperCase ( )
the DecimalFormat class
boolean nextBoolean( )
25. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
behaviors of an object
promotion
import java.util*
null