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. An object in Java - defined by the class String
private
formal parameters
mutator method
character string
2. Returns true if the scanner has anotehr token in its input.
String nextLine( )
enumerated type
boolean hasNext( )
parameter
3. A value that is passed into a method when it is invoked
Scanner class
double
Scanner useDelimiter(String pattern)
parameter
4. Widening byte: _________ - to int - to long - to float - to double
instantiation
byte to short
encapsulation of an object
variable
5. Methods in the Math class are ______
operations
java.lang package
static
Scanner scan=new Scanner (System.in);
6. Two floating data types: float - _______
boolean equalsIgnoreCase (String str)
double
String toUpperCase ( )
RH
7. A name for a location in memory used to hold a data value.
return statement
variable
parameter
string name;
8. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
String (String str)
local data
NumberFormat class
arithmetic
9. We use an object when we have a _________ to it
uninitialized variables
char charAt (int index)
conditional statement
reference
10. ____________ is instantiated in the traditional way using the new operator.
have void
the DecimalFormat class
reserved word void
return statement
11. A ________________ is immutable.
pointer
parentheses
String object
byte nextByte( )
12. 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
variable
inheritance
static int parseInt (String str)
Understanding
13. 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
instance data
header of a method
aliases
actual parameters
14. Constants are ______ because the can't be changed once you use the final modifier
tokens
conditional statement
public
casting
15. 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.
boolean equalsIgnoreCase (String str)
encapsulation
declared
aliases
16. 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
int length( )
casting
class
packages
17. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
postfix form
the "import" declaration
operations
aliases
18. Returns the next input token as a character string.
static
class level
assignment conversion
String next( )
19. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
a constructor
private
promotion
parentheses
20. Part of the java.util class; picks a number at random out of a range of values.
not possible
boolean hasNext( )
expression
Random class
21. Returns a new string consisting of this string concatenated with str.
String concat (String str)
self-governing
public
method
22. Represents either a primitive value or an object
class
variable name
Scanner useDelimiter(String pattern)
operations
23. Cast operator has _________ precedence to division
parameter
String nextLine( )
higher
delimiters
24. Constructor: creates a new string object with the same characters as str.
String findInLine (String pattern)
assignment conversion
visibility modifiers
String (String str)
25. Declared in a class but not inside any particular method
boolean hasNext( )
visibility modifiers
instance data
conditionals
26. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
formal parameters
behaviors of an object
scope
public
27. Elements of input
encapsulation of an object
self-governing
tokens
class
28. format for constants: all upper-case; separated by ________
delimiters
header of a method
null
underscores
29. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
static
enumerated type
self-governing
30. 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
java.lang package
method invocation
expression
service methods
31. Also called a selection statement b/c it allows us to choose which statement will be executed next.
a constructor
packages
conditional statement
visibility modifiers
32. The act of creating an object using the "new" operator
parameter
floating point numbers
instantiation
called method
33. Instance data should be defined with what________ visibility
inheritance
String next( )
packages
private
34. Four integer data types: byte - short - int - _____
String substring (int offset - int endIndex)
packages
long
not possible
35. 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 -
boolean hasNext( )
class
instance data
import java.util*
36. 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
boolean nextBoolean( )
attributes of an object
string name;
reference
37. 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
string literal
Random ( )
literal
38. The Scanner class is part of ___________________
java.util class libary
int compareTo (String str)
local data
boolean equals (String str)
39. The classes of the Java standard class library are grouped into __________.
method
called method
packages
operations
40. Count++; count--
instance variable
postfix form
operations
String object
41. Variables that don't contain any data
literal
uninitialized variables
boolean equals (String str)
String next( )
42. 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
scope
character literal
pointer
String findInLine (String pattern)
43. ______________ operators have higher precedence
byte to short
arithmetic
the DecimalFormat class
autoboxing
44. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String substring (int offset - int endIndex)
parameter list
support methods
String nextLine( )
45. 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.
int length( )
enumerated type
character string
local data
46. All numeric types are _______ - meaning both positive and negative values can be stored in them
long
signed
delimiters
constants
47. 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.
support methods
assignment conversion
variable declaration
String (String str)
48. White space characters such as space characters - tabs - and new lines that separate the elements of input
boolean value
a constructor
delimiters
uninitialized variables
49. An object has behaviors - which are defined by the ________ associated with that object.
double
prefix form
operations
the "import" declaration
50. Returns the number of characters in this stirng.
String next( )
parameter
int length( )
return statement