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. An object has behaviors - which are defined by the ________ associated with that object.
String next( )
Scanner useDelimiter(String pattern)
operations
primitive variables
2. ++count; -- count
header of a method
instance data
int length( )
prefix form
3. A ________________ is immutable.
boolean value
String toUpperCase ( )
String object
parameter list
4. 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
NumberFormat class
attributes of an object
String toLowerCase ( )
encapsulation of an object
5. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
string name;
support methods
method
String (String str)
6. Three ways in which Java conversions occur: _________ conversion - promotion - casting
wrapper class
assignment
java.lang package
reference
7. _____ expression evaluated first
assignment
constants
instance variable
RH
8. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
method invocation
conditional statement
instance variable
signed
9. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
int compareTo (String str)
delimiters
promotion
variable
10. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
the "import" declaration
arithmetic
boolean equalsIgnoreCase (String str)
method invocation
11. Elements of input
string literal
byte nextByte( )
tokens
uninitialized variables
12. Expressed in a Java program with single quotes
local data
character literal
private
class level
13. Cast operator has _________ precedence to division
higher
service methods
header of a method
scope
14. Returns a new string consisting of this string concatenated with str.
java.lang package
String concat (String str)
instance data
long
15. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
scope
local data
String toLowerCase ( )
variable declaration
16. A method that returns a value must have a _________
floating point numbers
return statement
instance data
accessor method
17. Returns the int corresponding to the value stored in the specified string
service methods
static int parseInt (String str)
tokens
actual parameters
18. 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
java.util class libary
encapsulation of an object
wrapper class
set
19. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
attributes of an object
class level
accessor method
initialize
20. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
header of a method
the "import" declaration
return statement
java.lang package
21. Instance data should be defined with what________ visibility
mutator method
state of an object
private
constants
22. Boolean type conversions are ___________
attributes of an object
RH
constants
not possible
23. Represents either a primitive value or an object
Scanner useDelimiter(String pattern)
variable name
inheritance
instance data
24. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
byte to short
class
behaviors of an object
parameter
25. Two floating data types: float - _______
double
java.lang package
data values
self-governing
26. An object in Java - defined by the class String
character string
behaviors of an object
String toUpperCase ( )
boolean nextBoolean( )
27. Returns the next input token as a character string.
String next( )
String toLowerCase ( )
Scanner scan=new Scanner (System.in);
java.lang package
28. 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.
parameter
visibility modifiers
dot operator
state of an object
29. The Scanner class is part of ___________________
Understanding
java.util class libary
aliases
instance data
30. After an object has been instantiated - we set the _________ to access its methods
dot operator
tokens
flow of control
constants
31. A variable that refers to an object must be __________
byte to short
actual parameters
declared
flow of control
32. 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
encapsulation
expression
behaviors of an object
parentheses
33. New memory space is reserved for that variable every time an instance of the class that is created.
class library
instance data
data values
floating point numbers
34. 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.
reserved word void
parameter list
long
header of a method
35. 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
prefix form
Scanner scan=new Scanner (System.in);
encapsulation
36. Widening byte: _________ - to int - to long - to float - to double
boolean equalsIgnoreCase (String str)
byte to short
conditional statement
parameter
37. The order in which statements are executed in a running program
flow of control
Understanding
String next( )
Scanner useDelimiter(String pattern)
38. A class usually provides services to access and modify __________
data values
the DecimalFormat class
java.util class libary
polymorphism
39. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
variable
the "import" declaration
header of a method
primitive variables
40. All wrapper classes are defined in ___________
called method
java.lang package
assignment statement
service methods
41. 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
return statement
java.lang package
attributes of an object
pointer
42. Modifier>type/void>identifier>parameters>method body
local data
private
method declaration
declared
43. 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
character literal
int compareTo (String str)
have void
pointer
44. Delimited by double quotation characters
string literal
instance data
assignment
expression
45. Returns the number of characters in this stirng.
attributes of an object
String nextLine( )
int length( )
Scanner class
46. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
formal parameters
prefix form
parentheses
character literal
47. The names of the parameters in the header of the method declaration
formal parameters
parameter
class library
System.out.println
48. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
private
boolean nextBoolean( )
String substring (int offset - int endIndex)
method declaration
49. White space characters such as space characters - tabs - and new lines that separate the elements of input
null
literal
delimiters
promotion
50. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
method
enumerated type
String toLowerCase ( )
a constructor