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. This declaration creates a Scanner object that reads input from the keyboard
higher
Scanner scan=new Scanner (System.in);
NumberFormat class
String toLowerCase ( )
2. Four integer data types: byte - short - int - _____
long
method declaration
arithmetic
underscores
3. Methods in the Math class are ______
string name;
prefix form
static
parameter
4. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
service methods
operations
expression
String substring (int offset - int endIndex)
5. 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
arithmetic
int length( )
not possible
variable declaration
6. Part of the java.util class; picks a number at random out of a range of values.
method
Random class
parameter
self-governing
7. Constructor: creates a new pseudorandom number generator.
int length( )
public
Random ( )
a constructor
8. 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
set
formal parameters
wrapper class
9. 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
private
inheritance
prefix form
System.out.println
10. A name for a location in memory used to hold a data value.
wrapper class
enumerated type
variable
RH
11. Delimited by double quotation characters
self-governing
int length( )
variable
string literal
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;
import java.util*
method invocation
aliases
13. ____________ is instantiated in the traditional way using the new operator.
scope
Scanner useDelimiter(String pattern)
uninitialized variables
the DecimalFormat class
14. The one that is invoked
set
called method
reference
data values
15. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
underscores
NumberFormat class
instance data
String replace (char oldChar - char newChar)
16. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
assignment statement
behaviors of an object
int compareTo (String str)
17. The names of the parameters in the header of the method declaration
parameter list
instance data
support methods
formal parameters
18. 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
visibility modifiers
reference
System.out.println
string literal
19. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
string name;
method
instance variable
long
20. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
arithmetic
accessor method
instance data
local data
21. All numeric types are _______ - meaning both positive and negative values can be stored in them
called method
signed
NumberFormat class
variable
22. An explicit data value used in a program
literal
String replace (char oldChar - char newChar)
null
mutator method
23. Constants are ______ because the can't be changed once you use the final modifier
public
initialize
scope
int length( )
24. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
signed
character string
byte to short
25. 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 -
method invocation
class
assignment statement
have void
26. A ________________ is immutable.
String object
boolean nextBoolean( )
string name;
method invocation
27. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
instantiation
self-governing
public
attributes of an object
28. ______________ operators have higher precedence
packages
arithmetic
autoboxing
return statement
29. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
conditional statement
promotion
escape sequences
String format (double number)
30. The classes of the Java standard class library are grouped into __________.
service methods
packages
encapsulation of an object
assignment conversion
31. 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.
casting
reserved word void
escape sequences
String toUpperCase ( )
32. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
variable name
boolean equalsIgnoreCase (String str)
declared
assignment statement
33. Boolean type conversions are ___________
actual parameters
delimiters
not possible
static int parseInt (String str)
34. Three ways in which Java conversions occur: _________ conversion - promotion - casting
String (String str)
Random ( )
assignment
class library
35. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
pointer
wrapper class
NumberFormat class
36. Returns the next input token as the indicated type.
long
boolean value
instance variable
boolean nextBoolean( )
37. _____ expression evaluated first
char charAt (int index)
inheritance
prefix form
RH
38. Attempts to find the next occurence of the specified pattern - ignoring delimiters
aliases
String findInLine (String pattern)
escape sequences
assignment statement
39. A method that returns a value must have a _________
return statement
behaviors of an object
conditional statement
header of a method
40. Modifier>type/void>identifier>parameters>method body
method declaration
parameter list
String (String str)
long
41. The act of creating an object using the "new" operator
reference
instantiation
String (String str)
mutator method
42. 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.
conditionals
visibility modifiers
floating point numbers
String substring (int offset - int endIndex)
43. Count++; count--
num=Integer.parseInt(str);
assignment conversion
service methods
postfix form
44. A null reference indicates that a variable does not refer to an object
packages
RH
null
boolean hasNext( )
45. An object has behaviors - which are defined by the ________ associated with that object.
NumberFormat class
boolean equals (String str)
method
operations
46. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
parameter list
mutator method
variable
behaviors of an object
47. Instance data should be defined with what________ visibility
instance data
method declaration
uninitialized variables
private
48. A class usually provides services to access and modify __________
a constructor
prefix form
parameter
data values
49. 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
the "import" declaration
boolean value
method invocation
static
50. Variables that don't contain any data
variable declaration
constants
uninitialized variables
boolean hasNext( )