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. 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
promotion
aliases
not possible
attributes of an object
2. All wrapper classes are defined in ___________
the "import" declaration
java.lang package
set
String (String str)
3. ____________ is instantiated in the traditional way using the new operator.
boolean equals (String str)
reserved word void
the DecimalFormat class
parameter
4. format for constants: all upper-case; separated by ________
conditional statement
underscores
signed
instance data
5. The classes of the Java standard class library are grouped into __________.
String replace (char oldChar - char newChar)
escape sequences
packages
private
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.
boolean equalsIgnoreCase (String str)
polymorphism
parentheses
String replace (char oldChar - char newChar)
7. Returns the character at the specified index.
higher
char charAt (int index)
double
expression
8. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
character literal
accessor method
set
Scanner class
9. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
floating point numbers
String nextLine( )
constructors
java.lang package
10. 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.
service methods
literal
reserved word void
header of a method
11. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
aliases
promotion
flow of control
12. 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
string name;
local data
prefix form
boolean equalsIgnoreCase (String str)
13. The automatic conversion between a primitive value and a corresponding wrapper object.
String replace (char oldChar - char newChar)
autoboxing
public
String toUpperCase ( )
14. 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 toLowerCase ( )
method
data values
string name;
15. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
int length( )
System.out.println
boolean equalsIgnoreCase (String str)
have void
16. They clarify the role a certain number has in the program.
header of a method
constants
String next( )
parameter
17. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
wrapper class
int length( )
tokens
String replace (char oldChar - char newChar)
18. Expressed in a Java program with single quotes
character literal
signed
local data
dot operator
19. White space characters such as space characters - tabs - and new lines that separate the elements of input
service methods
operations
String object
delimiters
20. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used
java.lang package
method invocation
variable declaration
num=Integer.parseInt(str);
21. Three ways in which Java conversions occur: _________ conversion - promotion - casting
variable declaration
assignment
boolean value
higher
22. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
boolean equals (String str)
polymorphism
byte nextByte( )
23. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
declared
self-governing
reference
encapsulation of an object
24. 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
java.lang package
String findInLine (String pattern)
called method
25. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
Random class
visibility modifiers
variable declaration
support methods
26. The one that is invoked
Understanding
called method
packages
scope
27. 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
System.out.println
String findInLine (String pattern)
int compareTo (String str)
have void
28. 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
variable declaration
boolean equalsIgnoreCase (String str)
formal parameters
behaviors of an object
29. This declaration creates a Scanner object that reads input from the keyboard
header of a method
byte to short
prefix form
Scanner scan=new Scanner (System.in);
30. Modifier>type/void>identifier>parameters>method body
java.lang package
method declaration
variable
packages
31. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
instance variable
String (String str)
promotion
private
32. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
boolean equalsIgnoreCase (String str)
assignment
self-governing
the "import" declaration
33. 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.
encapsulation
null
conditional statement
underscores
34. ______________ operators have higher precedence
boolean equalsIgnoreCase (String str)
arithmetic
Scanner useDelimiter(String pattern)
assignment
35. Changes a particular value - e.g.setX - where X is the value they are setting.
encapsulation of an object
wrapper class
mutator method
byte nextByte( )
36. Returns a new string consisting of this string concatenated with str.
promotion
not possible
boolean equals (String str)
boolean hasNext( )
37. Two floating data types: float - _______
String format (double number)
int compareTo (String str)
boolean nextBoolean( )
double
38. Constants are ______ because the can't be changed once you use the final modifier
arithmetic
constructors
data values
public
39. An explicit data value used in a program
packages
String toLowerCase ( )
instance data
literal
40. 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
escape sequences
encapsulation
instance data
41. The values passed into a method in an invocation; these are called the arguments to the method
int compareTo (String str)
support methods
actual parameters
parameter
42. 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
Understanding
prefix form
null
uninitialized variables
43. The act of creating an object using the "new" operator
String replace (char oldChar - char newChar)
character string
instantiation
flow of control
44. Returns the int corresponding to the value stored in the specified string
scope
behaviors of an object
assignment statement
static int parseInt (String str)
45. Sets the scanner's delimiting pattern.
parentheses
boolean nextBoolean( )
expression
Scanner useDelimiter(String pattern)
46. Constructor: creates a new pseudorandom number generator.
String object
behaviors of an object
Random class
Random ( )
47. Variables that don't contain any data
String format (double number)
escape sequences
uninitialized variables
tokens
48. Boolean type conversions are ___________
static
reserved word void
not possible
delimiters
49. A set of classes that supports the development of programs
int compareTo (String str)
primitive variables
assignment statement
class library
50. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
wrapper class
scope
header of a method
String toLowerCase ( )