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. Represents either a primitive value or an object
floating point numbers
Random ( )
variable name
encapsulation
2. 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.
parameter list
arithmetic
String toUpperCase ( )
reserved word void
3. All wrapper classes are defined in ___________
java.lang package
private
aliases
floating point numbers
4. A name for a location in memory used to hold a data value.
behaviors of an object
variable
boolean value
actual parameters
5. Constructor: creates a new string object with the same characters as str.
visibility modifiers
String nextLine( )
constants
String (String str)
6. 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
aliases
have void
String substring (int offset - int endIndex)
char charAt (int index)
7. Returns all input remaining on the current line as a character string.
String nextLine( )
mutator method
method invocation
instance variable
8. 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
flow of control
mutator method
Understanding
method invocation
9. 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.
delimiters
encapsulation of an object
variable name
polymorphism
10. The Scanner class is part of ___________________
parameter
java.util class libary
tokens
reference
11. 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.
accessor method
boolean equalsIgnoreCase (String str)
assignment conversion
private
12. Expressed in a Java program with single quotes
enumerated type
service methods
character literal
byte to short
13. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
actual parameters
conditional statement
int compareTo (String str)
boolean equals (String str)
14. 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
method declaration
Understanding
String replace (char oldChar - char newChar)
double
15. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
pointer
String toLowerCase ( )
String concat (String str)
boolean value
16. The classes of the Java standard class library are grouped into __________.
dot operator
have void
packages
java.lang package
17. ++count; -- count
long
char charAt (int index)
state of an object
prefix form
18. Also called a selection statement b/c it allows us to choose which statement will be executed next.
Scanner class
int compareTo (String str)
character string
conditional statement
19. Boolean type conversions are ___________
String substring (int offset - int endIndex)
String format (double number)
static int parseInt (String str)
not possible
20. 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.
constants
long
the "import" declaration
enumerated type
21. format for constants: all upper-case; separated by ________
underscores
parameter
Random class
assignment statement
22. Returns a new string consisting of this string concatenated with str.
String format (double number)
num=Integer.parseInt(str);
string name;
String concat (String str)
23. Every object has two things: a state and a _____ of behaviors
inheritance
variable name
actual parameters
set
24. New memory space is reserved for that variable every time an instance of the class that is created.
parameter list
set
int compareTo (String str)
instance data
25. 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
delimiters
string name;
static int parseInt (String str)
assignment statement
26. The act of creating an object using the "new" operator
instantiation
mutator method
operations
character string
27. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
set
String substring (int offset - int endIndex)
parentheses
import java.util*
28. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
instantiation
promotion
postfix form
method
29. Returns the number of characters in this stirng.
java.lang package
Scanner class
boolean hasNext( )
int length( )
30. 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
initialize
encapsulation of an object
boolean equals (String str)
header of a method
31. A class usually provides services to access and modify __________
signed
assignment statement
byte nextByte( )
data values
32. _____ expression evaluated first
RH
parentheses
String findInLine (String pattern)
casting
33. Each piece of data that we send to a method
public
aliases
parameter
service methods
34. Sets the scanner's delimiting pattern.
local data
String findInLine (String pattern)
Scanner scan=new Scanner (System.in);
Scanner useDelimiter(String pattern)
35. Two categories of statements that control the flow of executing through a method: __________ and loops
signed
conditionals
tokens
casting
36. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
Scanner scan=new Scanner (System.in);
have void
NumberFormat class
String concat (String str)
37. Variables that don't contain any data
static
uninitialized variables
import java.util*
self-governing
38. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
static
accessor method
support methods
a constructor
39. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
reference
service methods
long
uninitialized variables
40. 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
variable declaration
String object
method
instance variable
41. After an object has been instantiated - we set the _________ to access its methods
dot operator
have void
Understanding
reserved word void
42. 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
String next( )
boolean value
reserved word void
local data
43. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location
state of an object
class level
variable declaration
String substring (int offset - int endIndex)
44. An explicit data value used in a program
num=Integer.parseInt(str);
higher
literal
int length( )
45. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
data values
boolean equals (String str)
num=Integer.parseInt(str);
46. An object in Java - defined by the class String
accessor method
character string
data values
Random ( )
47. 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
attributes of an object
instance variable
packages
Random class
48. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
local data
character string
state of an object
parentheses
49. Instance data should be defined with what________ visibility
instance data
boolean equals (String str)
private
set
50. The values passed into a method in an invocation; these are called the arguments to the method
boolean hasNext( )
reserved word void
attributes of an object
actual parameters