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. Changes a particular value - e.g.setX - where X is the value they are setting.
accessor method
mutator method
higher
String format (double number)
2. 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
boolean nextBoolean( )
a constructor
byte to short
called method
3. 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
String findInLine (String pattern)
formal parameters
data values
Understanding
4. Returns all input remaining on the current line as a character string.
a constructor
mutator method
public
String nextLine( )
5. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
the "import" declaration
casting
byte to short
constants
6. Elements of input
static
instance data
tokens
character literal
7. Methods in the Math class are ______
class
static
method declaration
System.out.println
8. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
string name;
parameter
header of a method
String substring (int offset - int endIndex)
9. The order in which statements are executed in a running program
boolean hasNext( )
flow of control
constants
reserved word void
10. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case
wrapper class
the "import" declaration
boolean value
reference
11. Constructor: creates a new string object with the same characters as str.
String (String str)
System.out.println
support methods
visibility modifiers
12. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
pointer
constants
String substring (int offset - int endIndex)
reference
13. Every object has two things: a state and a _____ of behaviors
accessor method
state of an object
set
static
14. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
java.lang package
String findInLine (String pattern)
underscores
15. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
null
scope
state of an object
behaviors of an object
16. The one that is invoked
visibility modifiers
called method
String toUpperCase ( )
class library
17. The values passed into a method in an invocation; these are called the arguments to the method
enumerated type
actual parameters
self-governing
casting
18. _____ expression evaluated first
prefix form
RH
class library
parentheses
19. 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:
int length( )
assignment
num=Integer.parseInt(str);
constants
20. 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 -
import java.util*
tokens
aliases
class
21. A method that returns a value must have a _________
string name;
polymorphism
return statement
local data
22. Returns the next input token as the indicated type.
postfix form
class
assignment statement
byte nextByte( )
23. ______________ operators have higher precedence
instance data
Scanner class
arithmetic
class level
24. ++count; -- count
dot operator
System.out.println
String concat (String str)
prefix form
25. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
character string
boolean value
instance variable
formal parameters
26. 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
constants
variable name
class library
27. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
floating point numbers
expression
variable declaration
28. 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
casting
instance variable
constructors
char charAt (int index)
29. After an object has been instantiated - we set the _________ to access its methods
boolean value
parentheses
not possible
dot operator
30. 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.
character string
self-governing
postfix form
parameter list
31. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
parameter list
the DecimalFormat class
String toLowerCase ( )
service methods
32. 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
packages
System.out.println
String toLowerCase ( )
String replace (char oldChar - char newChar)
33. Cast operator has _________ precedence to division
method declaration
method invocation
higher
class
34. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
inheritance
NumberFormat class
encapsulation
char charAt (int index)
35. Each piece of data that we send to a method
method invocation
parameter
Scanner class
packages
36. Two floating data types: float - _______
Scanner class
parameter
instance data
double
37. A ________________ is immutable.
formal parameters
java.lang package
String object
state of an object
38. Returns the number of characters in this stirng.
declared
String findInLine (String pattern)
int length( )
public
39. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
java.lang package
variable
String format (double number)
40. 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.
floating point numbers
parentheses
primitive variables
visibility modifiers
41. format for constants: all upper-case; separated by ________
local data
String replace (char oldChar - char newChar)
underscores
autoboxing
42. An explicit data value used in a program
static
accessor method
higher
literal
43. Expressed in a Java program with single quotes
state of an object
String toUpperCase ( )
support methods
character literal
44. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
assignment
boolean hasNext( )
scope
45. Also called a selection statement b/c it allows us to choose which statement will be executed next.
parentheses
conditional statement
method declaration
state of an object
46. Variables that don't contain any data
uninitialized variables
String object
Scanner class
num=Integer.parseInt(str);
47. A null reference indicates that a variable does not refer to an object
null
reference
constructors
a constructor
48. 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
actual parameters
promotion
boolean equals (String str)
49. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
reference
character string
String toUpperCase ( )
parameter
50. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
Scanner class
autoboxing
reference
String replace (char oldChar - char newChar)