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. ______________ operators have higher precedence
return statement
aliases
arithmetic
local data
2. White space characters such as space characters - tabs - and new lines that separate the elements of input
parameter
enumerated type
delimiters
packages
3. sides=10;
state of an object
inheritance
boolean equalsIgnoreCase (String str)
assignment statement
4. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
instance data
mutator method
null
5. 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
character string
System.out.println
method declaration
byte nextByte( )
6. Constructor: creates a new pseudorandom number generator.
parameter list
encapsulation of an object
Random ( )
the "import" declaration
7. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
assignment conversion
Scanner class
String substring (int offset - int endIndex)
constants
8. Cast operator has _________ precedence to division
higher
enumerated type
formal parameters
boolean hasNext( )
9. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
constants
byte nextByte( )
behaviors of an object
10. Changes a particular value - e.g.setX - where X is the value they are setting.
parameter
method invocation
boolean equals (String str)
mutator method
11. After an object has been instantiated - we set the _________ to access its methods
Scanner class
instantiation
reference
dot operator
12. An explicit data value used in a program
class
local data
constructors
literal
13. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
declared
higher
boolean value
14. 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
conditionals
set
constructors
inheritance
15. 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
promotion
instance variable
Understanding
parentheses
16. Returns the next input token as the indicated type.
boolean nextBoolean( )
accessor method
static
mutator method
17. The classes of the Java standard class library are grouped into __________.
packages
parameter
int length( )
Understanding
18. 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.
have void
prefix form
String (String str)
polymorphism
19. A set of classes that supports the development of programs
String findInLine (String pattern)
class level
escape sequences
class library
20. The order in which statements are executed in a running program
public
accessor method
flow of control
null
21. 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
boolean equalsIgnoreCase (String str)
expression
escape sequences
enumerated type
22. 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
String replace (char oldChar - char newChar)
accessor method
state of an object
attributes of an object
23. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
polymorphism
constructors
double
assignment statement
24. Sets the scanner's delimiting pattern.
conditionals
casting
Scanner useDelimiter(String pattern)
initialize
25. _____ expression evaluated first
formal parameters
java.lang package
class level
RH
26. format for constants: all upper-case; separated by ________
static
underscores
expression
visibility modifiers
27. Also called a selection statement b/c it allows us to choose which statement will be executed next.
literal
conditional statement
String (String str)
public
28. 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
constants
method invocation
conditionals
operations
29. We use an object when we have a _________ to it
boolean nextBoolean( )
String findInLine (String pattern)
tokens
reference
30. Variables that don't contain any data
uninitialized variables
java.lang package
higher
accessor method
31. A class usually provides services to access and modify __________
actual parameters
Random ( )
data values
called method
32. They clarify the role a certain number has in the program.
constants
arithmetic
encapsulation
variable
33. A name for a location in memory used to hold a data value.
arithmetic
variable
escape sequences
class
34. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
String next( )
boolean nextBoolean( )
encapsulation
floating point numbers
35. 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
self-governing
scope
String next( )
36. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held
null
pointer
header of a method
behaviors of an object
37. Returns the character at the specified index.
autoboxing
char charAt (int index)
assignment
instance data
38. A ________________ is immutable.
String object
visibility modifiers
enumerated type
attributes of an object
39. Constants are ______ because the can't be changed once you use the final modifier
public
actual parameters
String substring (int offset - int endIndex)
String format (double number)
40. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
static int parseInt (String str)
class
the "import" declaration
not possible
41. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
encapsulation of an object
boolean equalsIgnoreCase (String str)
state of an object
accessor method
42. Elements of input
instance data
pointer
method invocation
tokens
43. A method that returns a value must have a _________
variable declaration
return statement
local data
delimiters
44. Constructors do not even _______; therefore they cannot return a value.
have void
private
boolean equals (String str)
num=Integer.parseInt(str);
45. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
flow of control
floating point numbers
instance data
String replace (char oldChar - char newChar)
46. Each piece of data that we send to a method
literal
num=Integer.parseInt(str);
parameter
signed
47. 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.
have void
parameter list
return statement
polymorphism
48. Two categories of statements that control the flow of executing through a method: __________ and loops
method invocation
conditionals
service methods
formal parameters
49. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
tokens
instantiation
assignment conversion
50. Methods in the Math class are ______
int compareTo (String str)
character literal
static
character string