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 true if this string contains the same characters as str (without regard to case) and false otherwise.
char charAt (int index)
instance data
boolean equalsIgnoreCase (String str)
String format (double number)
2. 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.
attributes of an object
assignment conversion
postfix form
boolean equalsIgnoreCase (String str)
3. A method that returns a value must have a _________
enumerated type
delimiters
return statement
self-governing
4. Elements of input
tokens
escape sequences
accessor method
String (String str)
5. When a variable is declared inside a method
local data
boolean value
instance data
encapsulation of an object
6. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off
method declaration
boolean value
arithmetic
pointer
7. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
long
state of an object
set
conditional statement
8. 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
signed
System.out.println
boolean value
static
9. Four integer data types: byte - short - int - _____
long
class
declared
String toUpperCase ( )
10. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
class library
parameter list
num=Integer.parseInt(str);
11. 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 (String str)
higher
parameter list
casting
12. Represents either a primitive value or an object
set
mutator method
assignment conversion
variable name
13. A set of classes that supports the development of programs
constants
declared
class library
set
14. Returns the next input token as a character string.
int compareTo (String str)
String next( )
underscores
conditionals
15. Also called a selection statement b/c it allows us to choose which statement will be executed next.
String substring (int offset - int endIndex)
set
method invocation
conditional statement
16. 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
static int parseInt (String str)
method invocation
declared
postfix form
17. sides=10;
assignment statement
expression
java.lang package
the "import" declaration
18. format for constants: all upper-case; separated by ________
String toUpperCase ( )
String next( )
underscores
null
19. Constructor: creates a new string object with the same characters as str.
num=Integer.parseInt(str);
variable declaration
constants
String (String str)
20. Two floating data types: float - _______
String object
double
String (String str)
method invocation
21. Count++; count--
literal
data values
self-governing
postfix form
22. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
wrapper class
parameter
boolean hasNext( )
23. Constructor: creates a new pseudorandom number generator.
String findInLine (String pattern)
Random ( )
private
parameter
24. ++count; -- count
prefix form
RH
boolean nextBoolean( )
escape sequences
25. 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
behaviors of an object
inheritance
encapsulation of an object
wrapper class
26. 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 -
instance data
class
parentheses
constants
27. A variable that refers to an object must be __________
declared
boolean equals (String str)
header of a method
string name;
28. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
byte to short
service methods
instance data
arithmetic
29. Modifier>type/void>identifier>parameters>method body
Random class
method declaration
assignment statement
boolean value
30. An object has behaviors - which are defined by the ________ associated with that object.
variable name
operations
class
not possible
31. Begins with a backslash character ""
set
enumerated type
NumberFormat class
escape sequences
32. The order in which statements are executed in a running program
flow of control
String findInLine (String pattern)
java.util class libary
variable name
33. A null reference indicates that a variable does not refer to an object
casting
null
have void
accessor method
34. Returns the character at the specified index.
String concat (String str)
operations
polymorphism
char charAt (int index)
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
Understanding
class library
arithmetic
String substring (int offset - int endIndex)
36. Part of the java.util class; picks a number at random out of a range of values.
Random class
boolean equals (String str)
instance variable
char charAt (int index)
37. Each piece of data that we send to a method
reserved word void
parameter
character string
boolean value
38. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
String (String str)
boolean equalsIgnoreCase (String str)
flow of control
constructors
39. Returns true if the scanner has anotehr token in its input.
String object
boolean hasNext( )
return statement
String findInLine (String pattern)
40. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
expression
NumberFormat class
support methods
string name;
41. 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
primitive variables
enumerated type
String format (double number)
42. Constants are ______ because the can't be changed once you use the final modifier
parameter list
visibility modifiers
boolean hasNext( )
public
43. ____________ is instantiated in the traditional way using the new operator.
boolean hasNext( )
the DecimalFormat class
attributes of an object
java.lang package
44. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
Scanner class
Random class
java.lang package
String replace (char oldChar - char newChar)
45. An explicit data value used in a program
literal
Scanner scan=new Scanner (System.in);
null
casting
46. Variables that don't contain any data
uninitialized variables
self-governing
constants
boolean equalsIgnoreCase (String str)
47. Returns a string containing the specified number formatted according to this object's pattern.
java.lang package
higher
tokens
String format (double number)
48. Returns a new string consisting of this string concatenated with str.
uninitialized variables
floating point numbers
class
String concat (String str)
49. Two categories of statements that control the flow of executing through a method: __________ and loops
String toLowerCase ( )
constructors
conditionals
Random class
50. 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
parameter
boolean nextBoolean( )
casting
int length( )