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. Every object has two things: a state and a _____ of behaviors
floating point numbers
set
string name;
NumberFormat class
2. Variables that don't contain any data
Scanner scan=new Scanner (System.in);
uninitialized variables
assignment
higher
3. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
service methods
instance variable
promotion
num=Integer.parseInt(str);
4. Before you use a variable __________it
operations
initialize
the DecimalFormat class
Scanner class
5. 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
prefix form
have void
self-governing
a constructor
6. sides=10;
Scanner useDelimiter(String pattern)
boolean value
assignment statement
signed
7. After an object has been instantiated - we set the _________ to access its methods
signed
dot operator
String toUpperCase ( )
class
8. Count++; count--
conditional statement
int compareTo (String str)
encapsulation of an object
postfix form
9. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
return statement
variable declaration
behaviors of an object
10. Returns a new string consisting of this string concatenated with str.
byte nextByte( )
boolean equals (String str)
java.lang package
accessor method
11. Two categories of statements that control the flow of executing through a method: __________ and loops
operations
byte to short
pointer
conditionals
12. A null reference indicates that a variable does not refer to an object
static
return statement
null
String (String str)
13. 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
parameter
wrapper class
method
null
14. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
boolean equals (String str)
Scanner class
reserved word void
15. 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 object
packages
the "import" declaration
16. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
mutator method
instance variable
character literal
17. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
assignment
variable declaration
boolean equals (String str)
18. 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
RH
class library
static int parseInt (String str)
variable declaration
19. When a variable is declared inside a method
RH
local data
encapsulation of an object
declared
20. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
casting
long
service methods
conditionals
21. 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
scope
uninitialized variables
variable
attributes of an object
22. The classes of the Java standard class library are grouped into __________.
encapsulation
byte to short
Scanner scan=new Scanner (System.in);
packages
23. All wrapper classes are defined in ___________
casting
char charAt (int index)
int length( )
java.lang package
24. The automatic conversion between a primitive value and a corresponding wrapper object.
service methods
autoboxing
conditionals
prefix form
25. Two floating data types: float - _______
support methods
double
attributes of an object
null
26. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off
boolean value
actual parameters
Random ( )
public
27. The act of creating an object using the "new" operator
instantiation
state of an object
a constructor
scope
28. The Scanner class is part of ___________________
java.util class libary
Random ( )
floating point numbers
import java.util*
29. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
public
actual parameters
Random ( )
30. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
enumerated type
String next( )
header of a method
variable
31. A class usually provides services to access and modify __________
declared
data values
String object
constructors
32. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
String substring (int offset - int endIndex)
primitive variables
int compareTo (String str)
33. Methods in the Math class are ______
conditionals
static
parentheses
assignment
34. An explicit data value used in a program
escape sequences
literal
return statement
formal parameters
35. ++count; -- count
class level
prefix form
return statement
literal
36. Returns a new string consisting of this string concatenated with str.
String concat (String str)
import java.util*
double
method invocation
37. Sets the scanner's delimiting pattern.
literal
Scanner useDelimiter(String pattern)
private
scope
38. Returns the next input token as the indicated type.
dot operator
method declaration
String replace (char oldChar - char newChar)
boolean nextBoolean( )
39. Instance data should be defined with what________ visibility
String (String str)
private
constructors
accessor method
40. Cast operator has _________ precedence to division
aliases
variable declaration
higher
reserved word void
41. Widening byte: _________ - to int - to long - to float - to double
string literal
byte to short
attributes of an object
variable
42. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
self-governing
static int parseInt (String str)
String toLowerCase ( )
signed
43. Constants are ______ because the can't be changed once you use the final modifier
int length( )
scope
public
set
44. 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
set
inheritance
java.lang package
byte to short
45. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
operations
String toLowerCase ( )
assignment statement
String toUpperCase ( )
46. The values passed into a method in an invocation; these are called the arguments to the method
visibility modifiers
set
called method
actual parameters
47. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
Scanner class
String replace (char oldChar - char newChar)
String substring (int offset - int endIndex)
string literal
48. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
mutator method
String nextLine( )
boolean equalsIgnoreCase (String str)
conditional statement
49. Delimited by double quotation characters
expression
not possible
string literal
num=Integer.parseInt(str);
50. White space characters such as space characters - tabs - and new lines that separate the elements of input
assignment conversion
delimiters
assignment
class level