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. Instance data should be defined with what________ visibility
private
called method
class level
boolean equals (String str)
2. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
String toUpperCase ( )
public
inheritance
NumberFormat class
3. Returns the character at the specified index.
char charAt (int index)
Random ( )
the DecimalFormat class
accessor method
4. After an object has been instantiated - we set the _________ to access its methods
formal parameters
dot operator
java.util class libary
num=Integer.parseInt(str);
5. Returns the next input token as the indicated type.
java.lang package
byte nextByte( )
string literal
higher
6. When a variable is declared inside a method
byte to short
local data
boolean value
tokens
7. The one that is invoked
enumerated type
uninitialized variables
int compareTo (String str)
called method
8. Cast operator has _________ precedence to division
higher
character literal
prefix form
initialize
9. 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 next( )
initialize
boolean nextBoolean( )
the "import" declaration
10. 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.
Scanner class
String substring (int offset - int endIndex)
char charAt (int index)
assignment conversion
11. ++count; -- count
byte nextByte( )
return statement
prefix form
casting
12. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
inheritance
declared
boolean equalsIgnoreCase (String str)
static
13. 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
boolean value
promotion
variable declaration
literal
14. 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
wrapper class
String object
self-governing
aliases
15. 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
mutator method
conditionals
Scanner class
initialize
16. Each piece of data that we send to a method
parameter
null
attributes of an object
byte to short
17. Two categories of statements that control the flow of executing through a method: __________ and loops
underscores
delimiters
conditionals
string literal
18. An explicit data value used in a program
class library
state of an object
class level
literal
19. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
initialize
a constructor
promotion
parameter
20. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
assignment
String toLowerCase ( )
autoboxing
21. 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
tokens
set
instance variable
expression
22. 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.
actual parameters
NumberFormat class
class
visibility modifiers
23. Constants are ______ because the can't be changed once you use the final modifier
parameter
boolean hasNext( )
NumberFormat class
public
24. Expressed in a Java program with single quotes
promotion
byte to short
character literal
variable name
25. Begins with a backslash character ""
escape sequences
class level
not possible
declared
26. A variable that refers to an object must be __________
flow of control
declared
reserved word void
null
27. Sets the scanner's delimiting pattern.
operations
character literal
Scanner useDelimiter(String pattern)
String object
28. An object has behaviors - which are defined by the ________ associated with that object.
aliases
return statement
operations
String next( )
29. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
uninitialized variables
a constructor
java.lang package
import java.util*
30. Changes a particular value - e.g.setX - where X is the value they are setting.
initialize
mutator method
local data
enumerated type
31. 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
arithmetic
assignment
declared
32. 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.
class library
declared
byte nextByte( )
enumerated type
33. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
support methods
method invocation
instance variable
string literal
34. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
packages
support methods
pointer
35. Declared in a class but not inside any particular method
static
instance data
reference
string literal
36. Constructor: creates a new string object with the same characters as str.
wrapper class
parentheses
String (String str)
class level
37. A set of classes that supports the development of programs
class library
Understanding
enumerated type
boolean hasNext( )
38. They clarify the role a certain number has in the program.
set
constants
char charAt (int index)
a constructor
39. format for constants: all upper-case; separated by ________
string literal
String format (double number)
String next( )
underscores
40. Delimited by double quotation characters
java.lang package
operations
parameter list
string literal
41. All wrapper classes are defined in ___________
System.out.println
byte to short
java.lang package
String findInLine (String pattern)
42. 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
signed
RH
mutator method
43. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
instance data
the DecimalFormat class
String substring (int offset - int endIndex)
44. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
assignment
java.lang package
self-governing
int compareTo (String str)
45. Returns a new string consisting of this string concatenated with str.
enumerated type
inheritance
String concat (String str)
String toLowerCase ( )
46. This declaration creates a Scanner object that reads input from the keyboard
parameter list
character literal
Scanner scan=new Scanner (System.in);
support methods
47. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
initialize
String toUpperCase ( )
long
String object
48. 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
the DecimalFormat class
java.util class libary
Random class
string name;
49. 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
Random class
long
System.out.println
arithmetic
50. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
parameter
enumerated type
literal