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 names of the parameters in the header of the method declaration
formal parameters
called method
boolean value
constants
2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
actual parameters
null
header of a method
3. ++count; -- count
prefix form
variable name
instance data
underscores
4. 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
boolean value
self-governing
enumerated type
5. Changes a particular value - e.g.setX - where X is the value they are setting.
parameter list
signed
method declaration
mutator method
6. Methods in the Math class are ______
Scanner class
promotion
boolean hasNext( )
static
7. 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.
dot operator
instance data
polymorphism
attributes of an object
8. Each piece of data that we send to a method
java.lang package
char charAt (int index)
conditional statement
parameter
9. ____________ is instantiated in the traditional way using the new operator.
instance variable
the DecimalFormat class
import java.util*
System.out.println
10. A method that returns a value must have a _________
private
flow of control
byte nextByte( )
return statement
11. Returns the next input token as the indicated type.
static
byte nextByte( )
Random ( )
assignment conversion
12. After an object has been instantiated - we set the _________ to access its methods
tokens
instance variable
dot operator
conditional statement
13. Sets the scanner's delimiting pattern.
parameter
String object
int length( )
Scanner useDelimiter(String pattern)
14. 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
instance data
private
a constructor
boolean equalsIgnoreCase (String str)
15. Constructor: creates a new pseudorandom number generator.
Random ( )
constants
instantiation
String (String str)
16. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
polymorphism
assignment conversion
state of an object
accessor method
17. Returns the int corresponding to the value stored in the specified string
String (String str)
static int parseInt (String str)
accessor method
String substring (int offset - int endIndex)
18. The Scanner class is part of ___________________
byte nextByte( )
pointer
java.lang package
java.util class libary
19. Variables and constants can be referenced in any method of the class by declaring at the _________
pointer
class level
int compareTo (String str)
String substring (int offset - int endIndex)
20. 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
encapsulation of an object
state of an object
Scanner useDelimiter(String pattern)
double
21. This declaration creates a Scanner object that reads input from the keyboard
RH
method
Scanner scan=new Scanner (System.in);
parameter
22. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
have void
accessor method
reserved word void
formal parameters
23. Constants are ______ because the can't be changed once you use the final modifier
public
byte nextByte( )
set
scope
24. 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
promotion
reserved word void
method declaration
25. 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
assignment statement
accessor method
String toUpperCase ( )
Understanding
26. Also called a selection statement b/c it allows us to choose which statement will be executed next.
encapsulation of an object
primitive variables
conditional statement
pointer
27. Two categories of statements that control the flow of executing through a method: __________ and loops
boolean equals (String str)
String format (double number)
method invocation
conditionals
28. Returns all input remaining on the current line as a character string.
the "import" declaration
literal
constants
String nextLine( )
29. A name for a location in memory used to hold a data value.
variable
boolean nextBoolean( )
accessor method
char charAt (int index)
30. 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
aliases
Random class
parameter
string name;
31. Returns true if the scanner has anotehr token in its input.
String findInLine (String pattern)
conditionals
operations
boolean hasNext( )
32. 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
parameter
Scanner class
accessor method
33. The act of creating an object using the "new" operator
assignment conversion
RH
instantiation
have void
34. Count++; count--
reserved word void
service methods
String replace (char oldChar - char newChar)
postfix form
35. 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.
int length( )
floating point numbers
Understanding
reserved word void
36. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
behaviors of an object
promotion
the "import" declaration
accessor method
37. Begins with a backslash character ""
escape sequences
prefix form
a constructor
signed
38. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
visibility modifiers
conditionals
return statement
39. New memory space is reserved for that variable every time an instance of the class that is created.
prefix form
instance data
set
String (String str)
40. Delimited by double quotation characters
data values
Scanner class
string literal
int length( )
41. format for constants: all upper-case; separated by ________
java.lang package
int length( )
conditionals
underscores
42. 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 toUpperCase ( )
accessor method
class level
the "import" declaration
43. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can
aliases
variable
operations
Scanner class
44. Widening byte: _________ - to int - to long - to float - to double
byte to short
dot operator
reference
int compareTo (String str)
45. We use an object when we have a _________ to it
num=Integer.parseInt(str);
String replace (char oldChar - char newChar)
reference
parameter
46. ______________ operators have higher precedence
System.out.println
casting
arithmetic
double
47. Returns the next input token as the indicated type.
visibility modifiers
boolean nextBoolean( )
byte to short
double
48. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
method declaration
int compareTo (String str)
Random ( )
literal
49. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
prefix form
String concat (String str)
enumerated type
50. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
promotion
encapsulation
the DecimalFormat class