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. Constructors do not even _______; therefore they cannot return a value.
have void
self-governing
assignment
set
2. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
constants
encapsulation
dot operator
String substring (int offset - int endIndex)
3. Cast operator has _________ precedence to division
num=Integer.parseInt(str);
wrapper class
higher
class library
4. 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
variable declaration
have void
String next( )
String toLowerCase ( )
5. An explicit data value used in a program
arithmetic
String findInLine (String pattern)
escape sequences
literal
6. 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
behaviors of an object
pointer
assignment
double
7. A variable that refers to an object must be __________
static
declared
String nextLine( )
import java.util*
8. Declared in a class but not inside any particular method
encapsulation
instance data
the DecimalFormat class
primitive variables
9. Returns the int corresponding to the value stored in the specified string
parentheses
primitive variables
boolean equalsIgnoreCase (String str)
static int parseInt (String str)
10. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
instance data
not possible
state of an object
conditional statement
11. A value that is passed into a method when it is invoked
self-governing
postfix form
state of an object
parameter
12. Returns the character at the specified index.
flow of control
static int parseInt (String str)
char charAt (int index)
boolean equalsIgnoreCase (String str)
13. An object in Java - defined by the class String
pointer
character string
encapsulation of an object
byte nextByte( )
14. Two floating data types: float - _______
enumerated type
boolean value
double
escape sequences
15. Instance data should be defined with what________ visibility
accessor method
private
String replace (char oldChar - char newChar)
assignment statement
16. After an object has been instantiated - we set the _________ to access its methods
escape sequences
boolean hasNext( )
java.util class libary
dot operator
17. Constants are ______ because the can't be changed once you use the final modifier
public
boolean nextBoolean( )
uninitialized variables
String findInLine (String pattern)
18. The values passed into a method in an invocation; these are called the arguments to the method
called method
prefix form
actual parameters
the DecimalFormat class
19. 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
class library
polymorphism
floating point numbers
aliases
20. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean nextBoolean( )
boolean equalsIgnoreCase (String str)
tokens
formal parameters
21. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
parameter
flow of control
promotion
string literal
22. Constructor: creates a new pseudorandom number generator.
parameter list
variable declaration
called method
Random ( )
23. 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.
parameter list
String findInLine (String pattern)
constructors
String next( )
24. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
autoboxing
Understanding
pointer
25. All wrapper classes are defined in ___________
java.lang package
flow of control
instance data
promotion
26. Delimited by double quotation characters
instance variable
string literal
import java.util*
enumerated type
27. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
enumerated type
underscores
constructors
assignment
28. The act of creating an object using the "new" operator
int compareTo (String str)
instantiation
String findInLine (String pattern)
pointer
29. Variables that don't contain any data
boolean equalsIgnoreCase (String str)
prefix form
uninitialized variables
data values
30. Each piece of data that we send to a method
encapsulation of an object
parameter
String toUpperCase ( )
instantiation
31. A null reference indicates that a variable does not refer to an object
int length( )
method invocation
class
null
32. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
java.util class libary
import java.util*
boolean value
variable declaration
33. ____________ is instantiated in the traditional way using the new operator.
long
String concat (String str)
RH
the DecimalFormat class
34. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
boolean nextBoolean( )
service methods
parameter list
primitive variables
35. We use an object when we have a _________ to it
variable name
String toLowerCase ( )
signed
reference
36. ++count; -- count
String (String str)
prefix form
assignment statement
data values
37. 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
Random class
not possible
floating point numbers
attributes of an object
38. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
method
conditional statement
behaviors of an object
string name;
39. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
Scanner class
floating point numbers
variable
instance variable
40. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
constructors
have void
escape sequences
header of a method
41. Constructor: creates a new string object with the same characters as str.
signed
double
String (String str)
boolean equals (String str)
42. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially
Scanner scan=new Scanner (System.in);
a constructor
pointer
signed
43. Variables and constants can be referenced in any method of the class by declaring at the _________
state of an object
class level
NumberFormat class
encapsulation of an object
44. 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;
System.out.println
local data
constructors
45. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
import java.util*
String replace (char oldChar - char newChar)
RH
scope
46. 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.
dot operator
declared
polymorphism
called method
47. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
instance data
character literal
arithmetic
48. Represents either a primitive value or an object
String format (double number)
parameter
operations
variable name
49. 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
prefix form
wrapper class
return statement
tokens
50. 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
String format (double number)
a constructor
character string