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. The values passed into a method in an invocation; these are called the arguments to the method
flow of control
actual parameters
num=Integer.parseInt(str);
boolean equalsIgnoreCase (String str)
2. Constructor: creates a new pseudorandom number generator.
Random ( )
scope
instance variable
parameter
3. Returns the character at the specified index.
variable declaration
casting
char charAt (int index)
prefix form
4. Part of the java.util class; picks a number at random out of a range of values.
static
constructors
Random class
Understanding
5. The names of the parameters in the header of the method declaration
formal parameters
Random ( )
underscores
behaviors of an object
6. 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
byte to short
parameter
variable name
System.out.println
7. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre
inheritance
support methods
int length( )
flow of control
8. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
postfix form
a constructor
java.lang package
byte to short
9. ____________ is instantiated in the traditional way using the new operator.
String nextLine( )
the DecimalFormat class
expression
constructors
10. The Scanner class is part of ___________________
prefix form
promotion
parameter list
java.util class libary
11. We use an object when we have a _________ to it
reference
state of an object
parameter list
java.lang package
12. A group of programming statements that is given a name. when a method is invoked - its statements are executed. a set of methods is associated with an object and defines its potential behaviors. to define the ability to make a deposit into a bank acc
method
Random class
parameter
java.lang package
13. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
reserved word void
String object
String format (double number)
import java.util*
14. Constructors do not even _______; therefore they cannot return a value.
conditionals
service methods
String substring (int offset - int endIndex)
have void
15. Count++; count--
conditionals
postfix form
string name;
flow of control
16. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
casting
parameter
data values
17. Every object has two things: a state and a _____ of behaviors
parameter list
set
reference
Random ( )
18. 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
header of a method
uninitialized variables
instance data
19. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
String object
literal
int compareTo (String str)
the "import" declaration
20. Modifier>type/void>identifier>parameters>method body
java.lang package
method declaration
byte to short
string literal
21. Represents either a primitive value or an object
variable name
assignment
int length( )
character literal
22. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
double
assignment statement
header of a method
method
23. A set of classes that supports the development of programs
support methods
class library
have void
the DecimalFormat class
24. Constructor: creates a new string object with the same characters as str.
Scanner useDelimiter(String pattern)
method
String (String str)
accessor method
25. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
class level
constructors
method declaration
primitive variables
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.
class library
String next( )
polymorphism
String substring (int offset - int endIndex)
27. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
conditionals
parameter list
header of a method
state of an object
28. A value that is passed into a method when it is invoked
scope
self-governing
parameter
byte to short
29. A null reference indicates that a variable does not refer to an object
null
Scanner useDelimiter(String pattern)
floating point numbers
static int parseInt (String str)
30. Sets the scanner's delimiting pattern.
String substring (int offset - int endIndex)
tokens
Scanner useDelimiter(String pattern)
local data
31. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
string literal
tokens
floating point numbers
32. Returns the next input token as the indicated type.
primitive variables
prefix form
byte nextByte( )
static
33. 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.
data values
prefix form
reserved word void
header of a method
34. An explicit data value used in a program
System.out.println
literal
variable
formal parameters
35. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String next( )
NumberFormat class
String substring (int offset - int endIndex)
behaviors of an object
36. Two categories of statements that control the flow of executing through a method: __________ and loops
flow of control
the DecimalFormat class
Scanner class
conditionals
37. Delimited by double quotation characters
self-governing
int length( )
string literal
header of a method
38. They clarify the role a certain number has in the program.
constants
arithmetic
packages
method invocation
39. An object has behaviors - which are defined by the ________ associated with that object.
operations
static int parseInt (String str)
local data
String nextLine( )
40. A ________________ is immutable.
pointer
formal parameters
String toLowerCase ( )
String object
41. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
pointer
promotion
primitive variables
boolean equalsIgnoreCase (String str)
42. _____ expression evaluated first
local data
constructors
RH
packages
43. A name for a location in memory used to hold a data value.
mutator method
boolean nextBoolean( )
variable
assignment
44. 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
variable
boolean value
aliases
String toLowerCase ( )
45. Instance data should be defined with what________ visibility
enumerated type
private
dot operator
String concat (String str)
46. A class usually provides services to access and modify __________
polymorphism
data values
the DecimalFormat class
constructors
47. 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
character string
encapsulation of an object
method declaration
class level
48. 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
primitive variables
int length( )
polymorphism
aliases
49. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
java.util class libary
higher
num=Integer.parseInt(str);
wrapper class
50. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
num=Integer.parseInt(str);
Understanding
tokens
support methods