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. 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.
NumberFormat class
scope
literal
String toUpperCase ( )
2. An object in Java - defined by the class String
RH
character string
boolean equalsIgnoreCase (String str)
String (String str)
3. Constants are ______ because the can't be changed once you use the final modifier
not possible
class level
public
self-governing
4. Delimited by double quotation characters
floating point numbers
long
attributes of an object
string literal
5. 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
java.util class libary
packages
String next( )
string name;
6. 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.
instantiation
visibility modifiers
service methods
assignment statement
7. 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.
method invocation
expression
literal
enumerated type
8. Every object has two things: a state and a _____ of behaviors
boolean nextBoolean( )
set
null
Scanner useDelimiter(String pattern)
9. 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
self-governing
character literal
postfix form
System.out.println
10. 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
signed
attributes of an object
parentheses
promotion
11. 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
inheritance
casting
class level
Random ( )
12. 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
attributes of an object
initialize
expression
String format (double number)
13. Represents either a primitive value or an object
packages
variable name
Random class
state of an object
14. 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
pointer
String toUpperCase ( )
java.util class libary
reference
15. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
parameter
System.out.println
self-governing
constants
16. Returns the next input token as the indicated type.
String toLowerCase ( )
boolean nextBoolean( )
mutator method
Random ( )
17. The classes of the Java standard class library are grouped into __________.
visibility modifiers
packages
enumerated type
a constructor
18. Returns a new string consisting of this string concatenated with str.
byte to short
boolean equals (String str)
floating point numbers
int length( )
19. Two floating data types: float - _______
byte nextByte( )
postfix form
double
int length( )
20. ++count; -- count
System.out.println
prefix form
class library
wrapper class
21. The names of the parameters in the header of the method declaration
int length( )
parameter list
formal parameters
declared
22. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
System.out.println
static int parseInt (String str)
method
23. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String substring (int offset - int endIndex)
literal
dot operator
flow of control
24. We use an object when we have a _________ to it
reference
boolean hasNext( )
instantiation
instance data
25. The one that is invoked
boolean nextBoolean( )
formal parameters
called method
encapsulation of an object
26. ______________ operators have higher precedence
local data
num=Integer.parseInt(str);
char charAt (int index)
arithmetic
27. The values passed into a method in an invocation; these are called the arguments to the method
behaviors of an object
actual parameters
scope
RH
28. Before you use a variable __________it
initialize
assignment statement
String object
char charAt (int index)
29. New memory space is reserved for that variable every time an instance of the class that is created.
constants
actual parameters
instance data
char charAt (int index)
30. 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
parameter
enumerated type
Scanner class
expression
31. Expressed in a Java program with single quotes
instance data
character literal
private
autoboxing
32. 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
class
accessor method
inheritance
assignment statement
33. 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
return statement
a constructor
instance data
pointer
34. Begins with a backslash character ""
encapsulation of an object
escape sequences
NumberFormat class
set
35. Each piece of data that we send to a method
reference
String concat (String str)
static
parameter
36. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
private
behaviors of an object
long
declared
37. Returns a new string consisting of this string concatenated with str.
parentheses
operations
mutator method
String concat (String str)
38. Elements of input
arithmetic
tokens
postfix form
aliases
39. Count++; count--
wrapper class
initialize
postfix form
byte to short
40. Sets the scanner's delimiting pattern.
byte to short
Scanner useDelimiter(String pattern)
behaviors of an object
reference
41. 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.
reference
declared
signed
polymorphism
42. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
expression
primitive variables
character string
constructors
43. Constructor: creates a new pseudorandom number generator.
Random ( )
String nextLine( )
assignment statement
parameter
44. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
num=Integer.parseInt(str);
operations
static int parseInt (String str)
attributes of an object
45. 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
local data
byte to short
conditional statement
46. A value that is passed into a method when it is invoked
parameter
service methods
method invocation
variable
47. Returns true if the scanner has anotehr token in its input.
mutator method
boolean hasNext( )
string literal
private
48. 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 list
mutator method
method
java.util class libary
49. The act of creating an object using the "new" operator
class level
reserved word void
instantiation
mutator method
50. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String next( )
String replace (char oldChar - char newChar)
data values
Random class