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. Returns the next input token as the indicated type.
pointer
java.lang package
signed
boolean nextBoolean( )
2. 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 -
boolean equals (String str)
boolean value
class
java.util class libary
3. All numeric types are _______ - meaning both positive and negative values can be stored in them
initialize
Scanner scan=new Scanner (System.in);
boolean equals (String str)
signed
4. 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
int compareTo (String str)
encapsulation
pointer
literal
5. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
have void
int compareTo (String str)
boolean value
service methods
6. Expressed in a Java program with single quotes
prefix form
character literal
escape sequences
class library
7. After an object has been instantiated - we set the _________ to access its methods
dot operator
scope
static int parseInt (String str)
parentheses
8. format for constants: all upper-case; separated by ________
floating point numbers
pointer
underscores
constants
9. We use an object when we have a _________ to it
enumerated type
signed
escape sequences
reference
10. Cast operator has _________ precedence to division
literal
higher
set
aliases
11. Also called a selection statement b/c it allows us to choose which statement will be executed next.
null
int compareTo (String str)
constants
conditional statement
12. Returns the character at the specified index.
arithmetic
char charAt (int index)
instance variable
variable declaration
13. 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
NumberFormat class
System.out.println
String replace (char oldChar - char newChar)
java.lang package
14. A value that is passed into a method when it is invoked
parameter list
string name;
underscores
parameter
15. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
static
public
autoboxing
instance variable
16. Begins with a backslash character ""
expression
escape sequences
String replace (char oldChar - char newChar)
operations
17. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
the DecimalFormat class
class library
return statement
18. 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.
method declaration
parameter list
class level
dot operator
19. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
autoboxing
support methods
underscores
floating point numbers
20. Two floating data types: float - _______
conditional statement
double
String nextLine( )
static
21. Represents either a primitive value or an object
String nextLine( )
variable name
character string
scope
22. A ________________ is immutable.
tokens
boolean nextBoolean( )
String object
underscores
23. Constructors do not even _______; therefore they cannot return a value.
variable name
String format (double number)
have void
attributes of an object
24. A name for a location in memory used to hold a data value.
polymorphism
accessor method
class library
variable
25. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
variable
formal parameters
the "import" declaration
not possible
26. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
parameter
support methods
String toLowerCase ( )
formal parameters
27. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
parameter
support methods
character string
28. All wrapper classes are defined in ___________
instance data
constants
java.lang package
reference
29. Three ways in which Java conversions occur: _________ conversion - promotion - casting
prefix form
assignment
int compareTo (String str)
boolean value
30. A method that returns a value must have a _________
uninitialized variables
promotion
return statement
RH
31. A Java operator that is specified by a type name in parentheses; truncates rather than rounds; useful in division if u want an integer to be treated as a float or double
casting
arithmetic
Random ( )
parameter
32. The act of creating an object using the "new" operator
the DecimalFormat class
uninitialized variables
instantiation
called method
33. 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.
enumerated type
conditionals
underscores
support methods
34. An object in Java - defined by the class String
wrapper class
character string
scope
autoboxing
35. 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
method invocation
constructors
polymorphism
set
36. The values passed into a method in an invocation; these are called the arguments to the method
java.util class libary
actual parameters
flow of control
import java.util*
37. Attempts to find the next occurence of the specified pattern - ignoring delimiters
null
instantiation
String findInLine (String pattern)
long
38. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
underscores
constructors
encapsulation
assignment statement
39. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
static
attributes of an object
parameter list
40. 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;
reference
java.lang package
String replace (char oldChar - char newChar)
41. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
delimiters
literal
accessor method
flow of control
42. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
assignment
mutator method
parentheses
String substring (int offset - int endIndex)
43. The names of the parameters in the header of the method declaration
formal parameters
casting
the "import" declaration
enumerated type
44. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially
String replace (char oldChar - char newChar)
instance data
data values
a constructor
45. Variables that don't contain any data
uninitialized variables
private
java.lang package
public
46. Delimited by double quotation characters
byte nextByte( )
java.util class libary
string literal
service methods
47. 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
int length( )
wrapper class
variable
java.lang package
48. The Scanner class is part of ___________________
class library
delimiters
java.util class libary
String format (double number)
49. The declarations of object variables have a similar structure to the declaration of _______________
String (String str)
behaviors of an object
encapsulation of an object
primitive variables
50. 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
pointer
variable declaration
boolean value