SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. A name for a location in memory used to hold a data value.
service methods
parameter
variable
variable declaration
2. 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
class
public
a constructor
Scanner class
3. Four integer data types: byte - short - int - _____
long
a constructor
String object
scope
4. ______________ operators have higher precedence
data values
boolean value
underscores
arithmetic
5. Returns a new string consisting of this string concatenated with str.
expression
postfix form
RH
boolean equals (String str)
6. Cast operator has _________ precedence to division
inheritance
arithmetic
higher
variable name
7. Returns all input remaining on the current line as a character string.
initialize
long
double
String nextLine( )
8. Before you use a variable __________it
autoboxing
initialize
variable declaration
casting
9. Instance data should be defined with what________ visibility
not possible
private
class level
instance data
10. Sets the scanner's delimiting pattern.
null
Scanner useDelimiter(String pattern)
arithmetic
Scanner scan=new Scanner (System.in);
11. An object has behaviors - which are defined by the ________ associated with that object.
operations
parentheses
assignment conversion
boolean nextBoolean( )
12. All numeric types are _______ - meaning both positive and negative values can be stored in them
boolean equalsIgnoreCase (String str)
String replace (char oldChar - char newChar)
instantiation
signed
13. Widening byte: _________ - to int - to long - to float - to double
Scanner class
byte to short
declared
static
14. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
private
String replace (char oldChar - char newChar)
have void
behaviors of an object
15. The order in which statements are executed in a running program
string name;
long
flow of control
boolean equalsIgnoreCase (String str)
16. 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
java.lang package
attributes of an object
arithmetic
17. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
initialize
not possible
dot operator
18. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
called method
instance variable
Understanding
boolean hasNext( )
19. An object in Java - defined by the class String
instance data
arithmetic
character string
String findInLine (String pattern)
20. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
inheritance
String toLowerCase ( )
variable
RH
21. Delimited by double quotation characters
escape sequences
boolean nextBoolean( )
string literal
literal
22. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
String (String str)
parameter list
assignment statement
23. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
self-governing
String replace (char oldChar - char newChar)
attributes of an object
primitive variables
24. 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.
parameter
enumerated type
assignment
character literal
25. Returns the character at the specified index.
arithmetic
char charAt (int index)
string literal
constants
26. Represents either a primitive value or an object
string literal
variable name
attributes of an object
polymorphism
27. 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.
postfix form
accessor method
java.lang package
encapsulation
28. 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
method
String concat (String str)
Scanner class
boolean equalsIgnoreCase (String str)
29. Constructors do not even _______; therefore they cannot return a value.
public
character string
have void
prefix form
30. 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
aliases
parameter list
Scanner class
local data
31. 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
data values
conditional statement
private
attributes of an object
32. Expressed in a Java program with single quotes
character literal
parameter
variable name
long
33. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
data values
String toLowerCase ( )
initialize
34. New memory space is reserved for that variable every time an instance of the class that is created.
service methods
instance data
Understanding
parameter list
35. 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
class
floating point numbers
variable declaration
static
36. 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.
return statement
String (String str)
support methods
visibility modifiers
37. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
formal parameters
promotion
accessor method
encapsulation of an object
38. A class usually provides services to access and modify __________
data values
method declaration
System.out.println
boolean nextBoolean( )
39. Returns the next input token as the indicated type.
attributes of an object
class library
expression
boolean nextBoolean( )
40. The one that is invoked
uninitialized variables
called method
variable
java.util class libary
41. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
encapsulation
inheritance
Random ( )
42. The blueprint of an object. establishes the kind of data an object of that type will hold and defines the methods that represent the behavior of such objects. however - a class contains no space to store data. each object has space for its own data -
a constructor
self-governing
class
encapsulation
43. Every object has two things: a state and a _____ of behaviors
NumberFormat class
java.lang package
set
the DecimalFormat class
44. Methods in the Math class are ______
aliases
static
method
actual parameters
45. 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.
the DecimalFormat class
Random ( )
a constructor
scope
46. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
long
signed
String format (double number)
support methods
47. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.util class libary
java.lang package
private
state of an object
48. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
instance variable
long
String concat (String str)
49. The declarations of object variables have a similar structure to the declaration of _______________
String (String str)
primitive variables
String object
char charAt (int index)
50. 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
boolean value
System.out.println
aliases
instance data