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 location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
scope
Scanner useDelimiter(String pattern)
state of an object
declared
2. 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
class library
method invocation
Understanding
String substring (int offset - int endIndex)
3. The order in which statements are executed in a running program
flow of control
primitive variables
String replace (char oldChar - char newChar)
RH
4. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
promotion
String toUpperCase ( )
NumberFormat class
aliases
5. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
class level
enumerated type
String (String str)
import java.util*
6. A ________________ is immutable.
conditional statement
static int parseInt (String str)
parentheses
String object
7. 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
primitive variables
string name;
method invocation
instantiation
8. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
actual parameters
delimiters
autoboxing
9. Constructor: creates a new pseudorandom number generator.
public
Random ( )
enumerated type
formal parameters
10. sides=10;
null
assignment statement
method declaration
System.out.println
11. Variables that don't contain any data
uninitialized variables
conditional statement
variable declaration
string name;
12. Represents either a primitive value or an object
String next( )
conditional statement
variable name
boolean nextBoolean( )
13. Methods in the Math class are ______
signed
packages
static
behaviors of an object
14. Sets the scanner's delimiting pattern.
instantiation
reference
Scanner useDelimiter(String pattern)
conditionals
15. Part of the java.util class; picks a number at random out of a range of values.
assignment
Random class
delimiters
parameter
16. White space characters such as space characters - tabs - and new lines that separate the elements of input
private
local data
Random ( )
delimiters
17. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
class level
state of an object
char charAt (int index)
RH
18. 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.
attributes of an object
instance data
encapsulation
parameter
19. ____________ is instantiated in the traditional way using the new operator.
conditional statement
operations
tokens
the DecimalFormat class
20. We use an object when we have a _________ to it
reference
flow of control
enumerated type
Scanner useDelimiter(String pattern)
21. Before you use a variable __________it
java.lang package
initialize
delimiters
method
22. Constructors do not even _______; therefore they cannot return a value.
scope
variable
have void
long
23. 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
declared
have void
int length( )
wrapper class
24. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
class
Understanding
Scanner class
25. 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
set
casting
NumberFormat class
String substring (int offset - int endIndex)
26. _____ expression evaluated first
tokens
method declaration
RH
polymorphism
27. The act of creating an object using the "new" operator
boolean hasNext( )
instantiation
java.lang package
have void
28. An object in Java - defined by the class String
boolean equals (String str)
byte to short
Scanner class
character string
29. 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 ( )
literal
string name;
30. Count++; count--
pointer
int length( )
postfix form
String (String str)
31. Elements of input
parentheses
tokens
formal parameters
java.lang package
32. Boolean type conversions are ___________
not possible
the DecimalFormat class
assignment
class library
33. Cast operator has _________ precedence to division
higher
boolean nextBoolean( )
class library
return statement
34. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
private
uninitialized variables
java.lang package
promotion
35. Returns the number of characters in this stirng.
operations
static int parseInt (String str)
method
int length( )
36. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data
variable name
string literal
expression
parameter list
37. All numeric types are _______ - meaning both positive and negative values can be stored in them
String object
polymorphism
assignment
signed
38. A set of classes that supports the development of programs
local data
attributes of an object
String toUpperCase ( )
class library
39. All wrapper classes are defined in ___________
mutator method
java.lang package
delimiters
instantiation
40. A class usually provides services to access and modify __________
the "import" declaration
have void
data values
static
41. Constants are ______ because the can't be changed once you use the final modifier
variable name
public
String concat (String str)
called method
42. Instance data should be defined with what________ visibility
parameter list
int length( )
private
String next( )
43. After an object has been instantiated - we set the _________ to access its methods
dot operator
declared
constants
int length( )
44. 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
operations
postfix form
string name;
a constructor
45. Returns the next input token as the indicated type.
assignment conversion
byte nextByte( )
visibility modifiers
String next( )
46. 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
Scanner useDelimiter(String pattern)
method
Random class
encapsulation of an object
47. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
NumberFormat class
local data
instance variable
attributes of an object
48. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
Random ( )
scope
the DecimalFormat class
header of a method
49. 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
encapsulation
import java.util*
boolean value
byte nextByte( )
50. Returns the next input token as a character string.
RH
String next( )
higher
String findInLine (String pattern)