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. 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
instantiation
expression
parameter list
String replace (char oldChar - char newChar)
2. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
called method
String toUpperCase ( )
actual parameters
int compareTo (String str)
3. Three ways in which Java conversions occur: _________ conversion - promotion - casting
method invocation
escape sequences
class
assignment
4. Four integer data types: byte - short - int - _____
static
long
java.lang package
packages
5. 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.
reserved word void
String object
string literal
state of an object
6. 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.
initialize
signed
encapsulation
character string
7. 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 -
formal parameters
class
set
instantiation
8. Two categories of statements that control the flow of executing through a method: __________ and loops
static
Understanding
expression
conditionals
9. Also called a selection statement b/c it allows us to choose which statement will be executed next.
static
conditional statement
String substring (int offset - int endIndex)
assignment statement
10. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
operations
String nextLine( )
String next( )
11. sides=10;
assignment statement
declared
set
floating point numbers
12. Returns all input remaining on the current line as a character string.
String nextLine( )
byte to short
String substring (int offset - int endIndex)
instance data
13. Returns the character at the specified index.
packages
parentheses
char charAt (int index)
conditionals
14. ____________ is instantiated in the traditional way using the new operator.
assignment
assignment conversion
byte nextByte( )
the DecimalFormat class
15. White space characters such as space characters - tabs - and new lines that separate the elements of input
state of an object
tokens
delimiters
java.lang package
16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
Understanding
encapsulation
string name;
self-governing
17. 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.
visibility modifiers
escape sequences
assignment conversion
Scanner useDelimiter(String pattern)
18. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
parameter list
String substring (int offset - int endIndex)
double
boolean value
19. Widening byte: _________ - to int - to long - to float - to double
constructors
initialize
java.lang package
byte to short
20. Modifier>type/void>identifier>parameters>method body
char charAt (int index)
postfix form
conditional statement
method declaration
21. ______________ operators have higher precedence
arithmetic
instance data
parentheses
null
22. A ________________ is immutable.
actual parameters
String object
System.out.println
method declaration
23. We use an object when we have a _________ to it
arithmetic
reference
java.util class libary
prefix form
24. Expressed in a Java program with single quotes
primitive variables
character literal
behaviors of an object
parameter
25. Every object has two things: a state and a _____ of behaviors
set
state of an object
promotion
data values
26. 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.
enumerated type
import java.util*
polymorphism
System.out.println
27. Returns a new string consisting of this string concatenated with str.
signed
visibility modifiers
mutator method
boolean equals (String str)
28. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
conditional statement
boolean equalsIgnoreCase (String str)
boolean nextBoolean( )
string name;
29. 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.
String findInLine (String pattern)
have void
parameter list
method
30. New memory space is reserved for that variable every time an instance of the class that is created.
java.util class libary
reference
instance data
have void
31. The automatic conversion between a primitive value and a corresponding wrapper object.
long
System.out.println
string name;
autoboxing
32. Part of the java.util class; picks a number at random out of a range of values.
Random class
double
instance data
packages
33. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
NumberFormat class
accessor method
data values
String concat (String str)
34. Declared in a class but not inside any particular method
class level
boolean nextBoolean( )
instance data
NumberFormat class
35. Before you use a variable __________it
behaviors of an object
initialize
set
declared
36. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
method invocation
flow of control
String (String str)
37. Instance data should be defined with what________ visibility
private
long
delimiters
variable declaration
38. The act of creating an object using the "new" operator
instantiation
parameter
actual parameters
String findInLine (String pattern)
39. A set of classes that supports the development of programs
parameter
not possible
packages
class library
40. After an object has been instantiated - we set the _________ to access its methods
dot operator
char charAt (int index)
pointer
class
41. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String object
String toUpperCase ( )
not possible
String toLowerCase ( )
42. The classes of the Java standard class library are grouped into __________.
not possible
packages
inheritance
string name;
43. Constructor: creates a new string object with the same characters as str.
a constructor
String (String str)
int length( )
String findInLine (String pattern)
44. 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
reference
static
instance variable
encapsulation of an object
45. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
instance data
primitive variables
Scanner scan=new Scanner (System.in);
service methods
46. 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
int length( )
a constructor
Random ( )
floating point numbers
47. An explicit data value used in a program
literal
instance data
private
arithmetic
48. Elements of input
visibility modifiers
String next( )
mutator method
tokens
49. _____ expression evaluated first
polymorphism
arithmetic
RH
variable declaration
50. Returns true if the scanner has anotehr token in its input.
visibility modifiers
System.out.println
boolean hasNext( )
class level