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. Expressed in a Java program with single quotes
expression
promotion
initialize
character literal
2. 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.
parameter list
polymorphism
the DecimalFormat class
Scanner scan=new Scanner (System.in);
3. The classes of the Java standard class library are grouped into __________.
packages
actual parameters
encapsulation of an object
visibility modifiers
4. Variables that don't contain any data
state of an object
long
String object
uninitialized variables
5. Two categories of statements that control the flow of executing through a method: __________ and loops
string literal
conditionals
behaviors of an object
the DecimalFormat class
6. 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
packages
pointer
scope
Scanner class
7. Every object has two things: a state and a _____ of behaviors
set
method
String toUpperCase ( )
encapsulation
8. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
parameter
prefix form
string name;
java.lang package
9. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
public
String toUpperCase ( )
enumerated type
promotion
10. 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
reserved word void
inheritance
a constructor
parameter list
11. Constants are ______ because the can't be changed once you use the final modifier
self-governing
signed
public
RH
12. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
casting
int compareTo (String str)
method invocation
13. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
public
self-governing
visibility modifiers
14. All wrapper classes are defined in ___________
java.lang package
String object
formal parameters
method invocation
15. Four integer data types: byte - short - int - _____
long
double
mutator method
import java.util*
16. Returns the character at the specified index.
instance data
String object
char charAt (int index)
long
17. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
System.out.println
string name;
visibility modifiers
18. Constructor: creates a new string object with the same characters as str.
String (String str)
actual parameters
flow of control
uninitialized variables
19. A class usually provides services to access and modify __________
parentheses
data values
primitive variables
dot operator
20. Sets the scanner's delimiting pattern.
packages
autoboxing
Scanner useDelimiter(String pattern)
data values
21. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
method
class
int compareTo (String str)
packages
22. sides=10;
variable declaration
assignment statement
String nextLine( )
promotion
23. An object has behaviors - which are defined by the ________ associated with that object.
operations
enumerated type
pointer
boolean nextBoolean( )
24. A variable that refers to an object must be __________
state of an object
reference
declared
java.lang package
25. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
signed
parameter list
autoboxing
26. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
boolean hasNext( )
string name;
String toLowerCase ( )
not possible
27. 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
instance data
promotion
Understanding
the "import" declaration
28. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
String replace (char oldChar - char newChar)
support methods
packages
the "import" declaration
29. Changes a particular value - e.g.setX - where X is the value they are setting.
parentheses
mutator method
string literal
String toUpperCase ( )
30. After an object has been instantiated - we set the _________ to access its methods
parameter list
method invocation
dot operator
constants
31. They clarify the role a certain number has in the program.
aliases
scope
constants
java.lang package
32. 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 -
instance data
long
have void
class
33. ______________ operators have higher precedence
wrapper class
assignment
packages
arithmetic
34. Count++; count--
primitive variables
higher
postfix form
method declaration
35. 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
parentheses
static
attributes of an object
literal
36. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
assignment conversion
boolean equals (String str)
self-governing
delimiters
37. 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.
reserved word void
the DecimalFormat class
actual parameters
public
38. 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
operations
aliases
parameter
java.lang package
39. 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
String format (double number)
String toUpperCase ( )
System.out.println
instance data
40. 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.
String object
parentheses
enumerated type
System.out.println
41. Modifier>type/void>identifier>parameters>method body
method declaration
class library
conditionals
String substring (int offset - int endIndex)
42. The automatic conversion between a primitive value and a corresponding wrapper object.
class
postfix form
constants
autoboxing
43. 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.
initialize
parameter list
assignment conversion
boolean hasNext( )
44. 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.
instance variable
uninitialized variables
formal parameters
visibility modifiers
45. The names of the parameters in the header of the method declaration
return statement
character literal
formal parameters
constants
46. Returns all input remaining on the current line as a character string.
casting
autoboxing
String format (double number)
String nextLine( )
47. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
String replace (char oldChar - char newChar)
inheritance
declared
service methods
48. Two floating data types: float - _______
promotion
double
private
polymorphism
49. The act of creating an object using the "new" operator
instantiation
instance data
promotion
parameter
50. 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
expression
variable declaration
inheritance
behaviors of an object