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. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
double
accessor method
promotion
instance variable
2. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String toUpperCase ( )
String substring (int offset - int endIndex)
variable
conditional statement
3. ____________ is instantiated in the traditional way using the new operator.
assignment statement
the DecimalFormat class
wrapper class
String nextLine( )
4. Elements of input
character literal
String nextLine( )
tokens
instantiation
5. Each piece of data that we send to a method
parameter
boolean value
method declaration
class level
6. Changes a particular value - e.g.setX - where X is the value they are setting.
arithmetic
Scanner scan=new Scanner (System.in);
postfix form
mutator method
7. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
String next( )
string literal
byte nextByte( )
self-governing
8. The classes of the Java standard class library are grouped into __________.
class
packages
have void
static int parseInt (String str)
9. The one that is invoked
assignment statement
escape sequences
called method
accessor method
10. The names of the parameters in the header of the method declaration
formal parameters
not possible
instance variable
called method
11. Returns the next input token as the indicated type.
boolean equals (String str)
boolean nextBoolean( )
RH
String object
12. 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
Scanner class
assignment
literal
parameter
13. An explicit data value used in a program
literal
boolean hasNext( )
method
formal parameters
14. White space characters such as space characters - tabs - and new lines that separate the elements of input
escape sequences
delimiters
constructors
Scanner scan=new Scanner (System.in);
15. An object in Java - defined by the class String
return statement
boolean equalsIgnoreCase (String str)
character string
RH
16. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
data values
character string
variable declaration
parentheses
17. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
String format (double number)
inheritance
Understanding
18. 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
reference
method declaration
behaviors of an object
attributes of an object
19. Returns the next input token as a character string.
boolean hasNext( )
arithmetic
service methods
String next( )
20. sides=10;
String replace (char oldChar - char newChar)
assignment statement
underscores
the "import" declaration
21. 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.
visibility modifiers
escape sequences
dot operator
Scanner class
22. 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.
scope
String format (double number)
return statement
java.lang package
23. Sets the scanner's delimiting pattern.
escape sequences
assignment
Scanner useDelimiter(String pattern)
NumberFormat class
24. Two floating data types: float - _______
String concat (String str)
expression
double
java.lang package
25. They clarify the role a certain number has in the program.
constants
prefix form
flow of control
encapsulation of an object
26. Begins with a backslash character ""
escape sequences
support methods
polymorphism
int length( )
27. 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
actual parameters
variable declaration
string name;
String concat (String str)
28. Two categories of statements that control the flow of executing through a method: __________ and loops
private
conditionals
a constructor
reserved word void
29. Constructor: creates a new string object with the same characters as str.
parameter list
String (String str)
parameter
pointer
30. 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
String format (double number)
int compareTo (String str)
method
reserved word void
31. Every object has two things: a state and a _____ of behaviors
int length( )
class library
reserved word void
set
32. New memory space is reserved for that variable every time an instance of the class that is created.
class level
java.lang package
postfix form
instance data
33. 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
double
have void
string name;
Random ( )
34. 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
reserved word void
expression
casting
instance variable
35. Widening byte: _________ - to int - to long - to float - to double
reference
dot operator
byte to short
class library
36. 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
inheritance
class
mutator method
java.lang package
37. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
string name;
state of an object
String concat (String str)
int compareTo (String str)
38. Variables that don't contain any data
uninitialized variables
String nextLine( )
attributes of an object
literal
39. Cast operator has _________ precedence to division
boolean equalsIgnoreCase (String str)
primitive variables
higher
tokens
40. Returns all input remaining on the current line as a character string.
String nextLine( )
aliases
postfix form
higher
41. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
expression
service methods
System.out.println
accessor method
42. Constructor: creates a new pseudorandom number generator.
a constructor
Random ( )
inheritance
long
43. 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
casting
header of a method
variable name
44. The declarations of object variables have a similar structure to the declaration of _______________
instantiation
primitive variables
postfix form
operations
45. 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
uninitialized variables
flow of control
parameter
encapsulation of an object
46. Returns true if the scanner has anotehr token in its input.
tokens
string name;
boolean hasNext( )
arithmetic
47. Expressed in a Java program with single quotes
conditionals
byte to short
character literal
aliases
48. Represents either a primitive value or an object
java.lang package
attributes of an object
variable name
constants
49. 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.
String concat (String str)
reserved word void
int compareTo (String str)
long
50. We use an object when we have a _________ to it
reference
expression
Scanner useDelimiter(String pattern)
arithmetic