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. 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
instance data
state of an object
aliases
method invocation
2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
byte nextByte( )
not possible
encapsulation of an object
floating point numbers
3. A method that returns a value must have a _________
return statement
aliases
int length( )
variable
4. Variables and constants can be referenced in any method of the class by declaring at the _________
NumberFormat class
variable name
class level
attributes of an object
5. Begins with a backslash character ""
escape sequences
encapsulation
operations
expression
6. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
prefix form
aliases
initialize
7. The one that is invoked
parameter
polymorphism
called method
constructors
8. Two categories of statements that control the flow of executing through a method: __________ and loops
uninitialized variables
private
conditionals
floating point numbers
9. All wrapper classes are defined in ___________
escape sequences
String next( )
byte to short
java.lang package
10. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
int length( )
java.lang package
local data
String concat (String str)
11. An explicit data value used in a program
packages
Random ( )
literal
floating point numbers
12. The names of the parameters in the header of the method declaration
formal parameters
operations
String (String str)
long
13. Returns the next input token as the indicated type.
expression
class
boolean nextBoolean( )
instance data
14. format for constants: all upper-case; separated by ________
scope
class
initialize
underscores
15. Cast operator has _________ precedence to division
character literal
the "import" declaration
higher
String toUpperCase ( )
16. Constructor: creates a new string object with the same characters as str.
String (String str)
RH
casting
java.lang package
17. 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
method invocation
casting
private
String findInLine (String pattern)
18. A ________________ is immutable.
String object
delimiters
String concat (String str)
String toLowerCase ( )
19. Constants are ______ because the can't be changed once you use the final modifier
signed
String object
public
Understanding
20. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
encapsulation
initialize
service methods
uninitialized variables
21. 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
import java.util*
promotion
Scanner class
aliases
22. Widening byte: _________ - to int - to long - to float - to double
header of a method
byte to short
String concat (String str)
String nextLine( )
23. They clarify the role a certain number has in the program.
expression
int length( )
the "import" declaration
constants
24. 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.
reserved word void
instantiation
Understanding
String substring (int offset - int endIndex)
25. Returns the character at the specified index.
double
character string
aliases
char charAt (int index)
26. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
the "import" declaration
promotion
literal
string name;
27. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
null
autoboxing
behaviors of an object
packages
28. Two floating data types: float - _______
Random ( )
arithmetic
enumerated type
double
29. _____ expression evaluated first
state of an object
class
called method
RH
30. 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.
String findInLine (String pattern)
encapsulation
constructors
null
31. Every object has two things: a state and a _____ of behaviors
primitive variables
scope
set
pointer
32. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
instance data
character literal
floating point numbers
33. Returns the next input token as a character string.
enumerated type
String next( )
initialize
boolean value
34. 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.
return statement
escape sequences
polymorphism
method invocation
35. An object has behaviors - which are defined by the ________ associated with that object.
private
promotion
visibility modifiers
operations
36. After an object has been instantiated - we set the _________ to access its methods
dot operator
boolean equalsIgnoreCase (String str)
double
tokens
37. A class usually provides services to access and modify __________
data values
boolean equals (String str)
assignment statement
boolean equalsIgnoreCase (String str)
38. A null reference indicates that a variable does not refer to an object
tokens
null
variable
static
39. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
assignment statement
String concat (String str)
tokens
boolean equalsIgnoreCase (String str)
40. 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.
state of an object
boolean nextBoolean( )
enumerated type
local data
41. Returns true if the scanner has anotehr token in its input.
boolean equalsIgnoreCase (String str)
parameter
flow of control
boolean hasNext( )
42. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object
string name;
support methods
method invocation
casting
43. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
parameter
String replace (char oldChar - char newChar)
actual parameters
44. The Scanner class is part of ___________________
java.util class libary
String object
Understanding
char charAt (int index)
45. Methods in the Math class are ______
dot operator
System.out.println
static
method
46. The order in which statements are executed in a running program
flow of control
public
service methods
data values
47. Each piece of data that we send to a method
aliases
higher
escape sequences
parameter
48. Returns the next input token as the indicated type.
byte nextByte( )
double
variable name
String nextLine( )
49. Attempts to find the next occurence of the specified pattern - ignoring delimiters
the DecimalFormat class
String findInLine (String pattern)
Random class
NumberFormat class
50. Constructor: creates a new pseudorandom number generator.
Random ( )
String concat (String str)
attributes of an object
assignment