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. Three ways in which Java conversions occur: _________ conversion - promotion - casting
java.lang package
assignment
wrapper class
called method
2. Count++; count--
String findInLine (String pattern)
data values
byte nextByte( )
postfix form
3. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
System.out.println
the "import" declaration
wrapper class
character string
4. Represents either a primitive value or an object
variable name
reference
java.lang package
instance data
5. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
long
conditional statement
boolean equalsIgnoreCase (String str)
Random class
6. 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
higher
String findInLine (String pattern)
attributes of an object
Scanner scan=new Scanner (System.in);
7. Returns true if the scanner has anotehr token in its input.
string literal
arithmetic
private
boolean hasNext( )
8. 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
variable name
Scanner scan=new Scanner (System.in);
double
9. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
Understanding
Random ( )
instance data
10. 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
reference
a constructor
postfix form
underscores
11. The names of the parameters in the header of the method declaration
formal parameters
flow of control
aliases
Random class
12. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
higher
called method
encapsulation of an object
java.lang package
13. Returns a new string consisting of this string concatenated with str.
String object
System.out.println
behaviors of an object
String concat (String str)
14. Declared in a class but not inside any particular method
instance data
inheritance
not possible
static
15. An object in Java - defined by the class String
variable
variable declaration
floating point numbers
character string
16. 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.
java.util class libary
visibility modifiers
constants
enumerated type
17. Begins with a backslash character ""
expression
escape sequences
parameter list
method
18. A method that returns a value must have a _________
literal
Random ( )
data values
return statement
19. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
underscores
delimiters
attributes of an object
state of an object
20. ____________ is instantiated in the traditional way using the new operator.
underscores
boolean hasNext( )
the DecimalFormat class
have void
21. Constants are ______ because the can't be changed once you use the final modifier
public
pointer
expression
arithmetic
22. Boolean type conversions are ___________
instance data
not possible
accessor method
inheritance
23. Variables that don't contain any data
import java.util*
String findInLine (String pattern)
uninitialized variables
String (String str)
24. Constructors do not even _______; therefore they cannot return a value.
have void
the DecimalFormat class
String replace (char oldChar - char newChar)
pointer
25. _____ expression evaluated first
polymorphism
java.lang package
RH
prefix form
26. A class usually provides services to access and modify __________
initialize
underscores
public
data values
27. 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.
visibility modifiers
enumerated type
constructors
boolean nextBoolean( )
28. The classes of the Java standard class library are grouped into __________.
NumberFormat class
expression
public
packages
29. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
static int parseInt (String str)
scope
the "import" declaration
import java.util*
30. Methods in the Math class are ______
accessor method
called method
service methods
static
31. Widening byte: _________ - to int - to long - to float - to double
character string
boolean hasNext( )
packages
byte to short
32. After an object has been instantiated - we set the _________ to access its methods
dot operator
floating point numbers
instance data
data values
33. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
static int parseInt (String str)
long
String substring (int offset - int endIndex)
Scanner useDelimiter(String pattern)
34. All numeric types are _______ - meaning both positive and negative values can be stored in them
Random class
boolean hasNext( )
floating point numbers
signed
35. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
java.lang package
promotion
byte to short
assignment statement
36. A set of classes that supports the development of programs
pointer
the "import" declaration
character literal
class library
37. 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
pointer
boolean nextBoolean( )
static
casting
38. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
assignment
static int parseInt (String str)
support methods
long
39. Returns the int corresponding to the value stored in the specified string
floating point numbers
instance data
static int parseInt (String str)
class library
40. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
operations
assignment
instance data
NumberFormat class
41. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
primitive variables
static int parseInt (String str)
return statement
self-governing
42. A value that is passed into a method when it is invoked
Scanner useDelimiter(String pattern)
enumerated type
parameter
have void
43. format for constants: all upper-case; separated by ________
variable name
arithmetic
String nextLine( )
underscores
44. Constructor: creates a new string object with the same characters as str.
char charAt (int index)
String (String str)
floating point numbers
method
45. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
RH
Understanding
instance variable
Scanner scan=new Scanner (System.in);
46. Attempts to find the next occurence of the specified pattern - ignoring delimiters
long
state of an object
support methods
String findInLine (String pattern)
47. Two categories of statements that control the flow of executing through a method: __________ and loops
class
conditionals
autoboxing
String toLowerCase ( )
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
string name;
String object
the DecimalFormat class
assignment
49. Expressed in a Java program with single quotes
constants
byte to short
character literal
assignment statement
50. They clarify the role a certain number has in the program.
static int parseInt (String str)
String toLowerCase ( )
constants
local data