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. Widening byte: _________ - to int - to long - to float - to double
byte to short
assignment conversion
casting
accessor method
2. 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
expression
private
variable name
conditional statement
3. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
Scanner class
floating point numbers
set
4. A variable that refers to an object must be __________
declared
boolean equalsIgnoreCase (String str)
int compareTo (String str)
actual parameters
5. Four integer data types: byte - short - int - _____
character literal
long
prefix form
promotion
6. When a variable is declared inside a method
local data
assignment
boolean equals (String str)
character string
7. 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
string literal
method invocation
not possible
String toLowerCase ( )
8. 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.
autoboxing
encapsulation
promotion
java.lang package
9. A null reference indicates that a variable does not refer to an object
the DecimalFormat class
constants
not possible
null
10. ++count; -- count
prefix form
encapsulation of an object
NumberFormat class
encapsulation
11. Returns the next input token as the indicated type.
byte nextByte( )
called method
visibility modifiers
boolean equalsIgnoreCase (String str)
12. Represents either a primitive value or an object
String findInLine (String pattern)
variable name
String next( )
static
13. Declared in a class but not inside any particular method
null
public
literal
instance data
14. Returns all input remaining on the current line as a character string.
packages
String nextLine( )
actual parameters
assignment
15. Before you use a variable __________it
called method
Understanding
the "import" declaration
initialize
16. The Scanner class is part of ___________________
instance variable
mutator method
wrapper class
java.util class libary
17. A ________________ is immutable.
prefix form
boolean hasNext( )
String object
boolean nextBoolean( )
18. The classes of the Java standard class library are grouped into __________.
private
packages
long
variable name
19. Three ways in which Java conversions occur: _________ conversion - promotion - casting
delimiters
set
have void
assignment
20. Attempts to find the next occurence of the specified pattern - ignoring delimiters
inheritance
String findInLine (String pattern)
double
boolean equalsIgnoreCase (String str)
21. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
initialize
the "import" declaration
String substring (int offset - int endIndex)
primitive variables
22. 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
visibility modifiers
formal parameters
System.out.println
literal
23. Two categories of statements that control the flow of executing through a method: __________ and loops
expression
Random ( )
character string
conditionals
24. Each piece of data that we send to a method
character string
parameter
behaviors of an object
static int parseInt (String str)
25. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
Scanner class
static
character literal
boolean equalsIgnoreCase (String str)
26. All wrapper classes are defined in ___________
java.lang package
byte nextByte( )
parameter
underscores
27. Returns the character at the specified index.
tokens
char charAt (int index)
initialize
Random ( )
28. An object has behaviors - which are defined by the ________ associated with that object.
conditional statement
operations
java.lang package
initialize
29. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
the DecimalFormat class
character string
num=Integer.parseInt(str);
import java.util*
30. Delimited by double quotation characters
inheritance
string literal
String toLowerCase ( )
conditionals
31. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
String concat (String str)
parentheses
assignment
conditionals
32. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc
service methods
method
signed
null
33. 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
String findInLine (String pattern)
boolean equalsIgnoreCase (String str)
wrapper class
variable name
34. New memory space is reserved for that variable every time an instance of the class that is created.
String substring (int offset - int endIndex)
polymorphism
variable declaration
instance data
35. 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.
assignment conversion
assignment statement
polymorphism
escape sequences
36. Returns the next input token as the indicated type.
header of a method
Random ( )
boolean nextBoolean( )
String object
37. The order in which statements are executed in a running program
flow of control
the DecimalFormat class
wrapper class
boolean hasNext( )
38. A set of classes that supports the development of programs
boolean nextBoolean( )
declared
class library
String toUpperCase ( )
39. 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.
instance variable
parameter list
escape sequences
int compareTo (String str)
40. 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:
set
num=Integer.parseInt(str);
String (String str)
return statement
41. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
variable
instantiation
prefix form
42. 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.
autoboxing
double
enumerated type
flow of control
43. Two floating data types: float - _______
promotion
double
support methods
string literal
44. Constructors do not even _______; therefore they cannot return a value.
Scanner useDelimiter(String pattern)
accessor method
String concat (String str)
have void
45. A method that returns a value must have a _________
char charAt (int index)
variable name
java.util class libary
return statement
46. 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.
encapsulation of an object
visibility modifiers
enumerated type
higher
47. 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
prefix form
variable
String toUpperCase ( )
casting
48. Variables and constants can be referenced in any method of the class by declaring at the _________
data values
set
delimiters
class level
49. Begins with a backslash character ""
escape sequences
encapsulation
java.lang package
char charAt (int index)
50. 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
character literal
class
local data