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. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
accessor method
variable declaration
scope
2. The values passed into a method in an invocation; these are called the arguments to the method
scope
actual parameters
support methods
RH
3. Constructor: creates a new string object with the same characters as str.
underscores
a constructor
Understanding
String (String str)
4. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
String substring (int offset - int endIndex)
accessor method
packages
promotion
5. A null reference indicates that a variable does not refer to an object
a constructor
String toUpperCase ( )
null
mutator method
6. 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.
class library
polymorphism
java.lang package
local data
7. They clarify the role a certain number has in the program.
wrapper class
signed
constants
state of an object
8. 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 -
int length( )
class
encapsulation of an object
character literal
9. 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
instance data
int length( )
expression
arithmetic
10. A value that is passed into a method when it is invoked
method declaration
parameter
String substring (int offset - int endIndex)
a constructor
11. Three ways in which Java conversions occur: _________ conversion - promotion - casting
instantiation
enumerated type
assignment
arithmetic
12. Four integer data types: byte - short - int - _____
String format (double number)
Scanner useDelimiter(String pattern)
String replace (char oldChar - char newChar)
long
13. Returns the character at the specified index.
public
System.out.println
tokens
char charAt (int index)
14. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
a constructor
instance variable
constructors
RH
15. sides=10;
assignment statement
floating point numbers
not possible
java.lang package
16. 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
byte nextByte( )
formal parameters
initialize
17. Sets the scanner's delimiting pattern.
boolean hasNext( )
underscores
Scanner useDelimiter(String pattern)
boolean equalsIgnoreCase (String str)
18. A method that returns a value must have a _________
return statement
Understanding
String concat (String str)
have void
19. 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.
int compareTo (String str)
enumerated type
Scanner useDelimiter(String pattern)
called method
20. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
boolean equalsIgnoreCase (String str)
formal parameters
long
constructors
21. 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
parameter list
instance data
wrapper class
casting
22. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
escape sequences
signed
java.util class libary
String replace (char oldChar - char newChar)
23. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
import java.util*
boolean equals (String str)
java.lang package
a constructor
24. Expressed in a Java program with single quotes
assignment conversion
String replace (char oldChar - char newChar)
local data
character literal
25. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
class
String toUpperCase ( )
higher
import java.util*
26. Modifier>type/void>identifier>parameters>method body
escape sequences
int compareTo (String str)
method declaration
the DecimalFormat class
27. Returns the int corresponding to the value stored in the specified string
Random class
declared
expression
static int parseInt (String str)
28. Each piece of data that we send to a method
NumberFormat class
class library
underscores
parameter
29. Methods in the Math class are ______
operations
reserved word void
static
floating point numbers
30. 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.
promotion
floating point numbers
Scanner class
scope
31. Returns the number of characters in this stirng.
int length( )
instantiation
parameter
java.lang package
32. Part of the java.util class; picks a number at random out of a range of values.
autoboxing
reserved word void
Random class
String toUpperCase ( )
33. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
floating point numbers
aliases
String (String str)
34. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
prefix form
initialize
mutator method
35. 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.
null
wrapper class
primitive variables
visibility modifiers
36. Begins with a backslash character ""
uninitialized variables
parameter
escape sequences
string name;
37. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
string literal
String next( )
import java.util*
Scanner scan=new Scanner (System.in);
38. Declared in a class but not inside any particular method
instance data
byte nextByte( )
String object
enumerated type
39. 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.
scope
parameter list
a constructor
formal parameters
40. Every object has two things: a state and a _____ of behaviors
return statement
byte to short
set
service methods
41. The classes of the Java standard class library are grouped into __________.
casting
higher
arithmetic
packages
42. An object has behaviors - which are defined by the ________ associated with that object.
header of a method
higher
operations
String object
43. 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
assignment
System.out.println
state of an object
constants
44. Variables and constants can be referenced in any method of the class by declaring at the _________
Random class
boolean value
boolean equalsIgnoreCase (String str)
class level
45. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
assignment
parameter
class
46. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
String replace (char oldChar - char newChar)
string name;
higher
47. 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
byte to short
static
string literal
48. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.
underscores
conditionals
reserved word void
tokens
49. When a variable is declared inside a method
pointer
operations
local data
import java.util*
50. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
expression
variable declaration
state of an object
a constructor