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. 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
self-governing
floating point numbers
string name;
not possible
2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
variable declaration
service methods
literal
Random class
3. Delimited by double quotation characters
string literal
double
Random ( )
String toLowerCase ( )
4. The one that is invoked
called method
operations
boolean value
public
5. Returns the next input token as the indicated type.
encapsulation of an object
actual parameters
static
boolean nextBoolean( )
6. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
have void
parameter
enumerated type
behaviors of an object
7. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
java.lang package
aliases
Random class
8. The order in which statements are executed in a running program
flow of control
self-governing
uninitialized variables
wrapper class
9. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
method
Scanner useDelimiter(String pattern)
instance variable
constructors
10. After an object has been instantiated - we set the _________ to access its methods
encapsulation
dot operator
have void
instance data
11. Variables and constants can be referenced in any method of the class by declaring at the _________
Scanner useDelimiter(String pattern)
escape sequences
dot operator
class level
12. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
instance data
String toLowerCase ( )
String findInLine (String pattern)
underscores
13. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
long
flow of control
String replace (char oldChar - char newChar)
14. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
Scanner useDelimiter(String pattern)
higher
import java.util*
Random ( )
15. 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.
int compareTo (String str)
polymorphism
promotion
method declaration
16. A ________________ is immutable.
tokens
encapsulation of an object
parameter
String object
17. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
operations
String object
underscores
18. Returns true if the scanner has anotehr token in its input.
class
polymorphism
variable
boolean hasNext( )
19. Returns the character at the specified index.
initialize
boolean hasNext( )
variable declaration
char charAt (int index)
20. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
method
escape sequences
import java.util*
floating point numbers
21. Returns the next input token as a character string.
method declaration
underscores
the DecimalFormat class
String next( )
22. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String nextLine( )
state of an object
parameter
support methods
23. Constructors do not even _______; therefore they cannot return a value.
boolean hasNext( )
escape sequences
polymorphism
have void
24. Four integer data types: byte - short - int - _____
String object
long
string literal
string name;
25. 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
System.out.println
encapsulation of an object
a constructor
class
26. Two categories of statements that control the flow of executing through a method: __________ and loops
String toUpperCase ( )
visibility modifiers
called method
conditionals
27. 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
boolean equals (String str)
accessor method
expression
support methods
28. ______________ operators have higher precedence
String toLowerCase ( )
parameter
inheritance
arithmetic
29. Represents either a primitive value or an object
variable name
attributes of an object
String concat (String str)
header of a method
30. A class usually provides services to access and modify __________
data values
assignment conversion
service methods
visibility modifiers
31. Instance data should be defined with what________ visibility
long
int length( )
conditional statement
private
32. 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
not possible
instance data
arithmetic
33. An object in Java - defined by the class String
static
character string
double
dot operator
34. 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
formal parameters
Scanner class
public
casting
35. 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
byte nextByte( )
Understanding
accessor method
double
36. Sets the scanner's delimiting pattern.
public
Scanner useDelimiter(String pattern)
encapsulation
boolean equalsIgnoreCase (String str)
37. Constructor: creates a new pseudorandom number generator.
Random ( )
higher
String object
conditional statement
38. 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 ( )
System.out.println
reserved word void
initialize
39. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
self-governing
String (String str)
assignment
String substring (int offset - int endIndex)
40. Declared in a class but not inside any particular method
instance data
the DecimalFormat class
character string
java.lang package
41. A null reference indicates that a variable does not refer to an object
null
import java.util*
parameter
service methods
42. Variables that don't contain any data
method
encapsulation
uninitialized variables
boolean equals (String str)
43. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
instance variable
not possible
Random class
NumberFormat class
44. Part of the java.util class; picks a number at random out of a range of values.
int length( )
int compareTo (String str)
Random class
have void
45. All wrapper classes are defined in ___________
visibility modifiers
java.lang package
the "import" declaration
behaviors of an object
46. Begins with a backslash character ""
literal
escape sequences
byte nextByte( )
Scanner scan=new Scanner (System.in);
47. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
String replace (char oldChar - char newChar)
instance data
self-governing
enumerated type
48. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
String toLowerCase ( )
literal
variable
49. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
variable name
behaviors of an object
primitive variables
50. 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
flow of control
Scanner class
the "import" declaration
wrapper class