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. ____________ is instantiated in the traditional way using the new operator.
String findInLine (String pattern)
Scanner scan=new Scanner (System.in);
the DecimalFormat class
boolean equalsIgnoreCase (String str)
2. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
the "import" declaration
variable declaration
String object
3. The classes of the Java standard class library are grouped into __________.
primitive variables
packages
instance variable
NumberFormat class
4. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
assignment conversion
Scanner scan=new Scanner (System.in);
java.lang package
5. 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.
scope
underscores
visibility modifiers
return statement
6. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
polymorphism
the DecimalFormat class
uninitialized variables
7. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
data values
delimiters
header of a method
assignment statement
8. Three ways in which Java conversions occur: _________ conversion - promotion - casting
have void
method declaration
assignment
import java.util*
9. All numeric types are _______ - meaning both positive and negative values can be stored in them
String (String str)
class
String toUpperCase ( )
signed
10. An object has behaviors - which are defined by the ________ associated with that object.
not possible
Scanner useDelimiter(String pattern)
RH
operations
11. 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
System.out.println
import java.util*
visibility modifiers
parentheses
12. Every object has two things: a state and a _____ of behaviors
String next( )
set
visibility modifiers
String substring (int offset - int endIndex)
13. A class usually provides services to access and modify __________
data values
service methods
String concat (String str)
char charAt (int index)
14. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
string literal
character literal
java.util class libary
15. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
method
primitive variables
constructors
set
16. Two floating data types: float - _______
conditional statement
String substring (int offset - int endIndex)
double
prefix form
17. 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
header of a method
constants
string literal
a constructor
18. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
boolean hasNext( )
postfix form
instance variable
19. 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
declared
have void
expression
signed
20. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
String replace (char oldChar - char newChar)
mutator method
parentheses
class
21. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
literal
java.lang package
instance data
Random class
22. Also called a selection statement b/c it allows us to choose which statement will be executed next.
a constructor
conditional statement
polymorphism
accessor method
23. 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 -
casting
class
escape sequences
assignment statement
24. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
state of an object
flow of control
local data
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
variable declaration
packages
casting
java.lang package
26. Count++; count--
uninitialized variables
postfix form
wrapper class
assignment conversion
27. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
promotion
RH
import java.util*
28. Before you use a variable __________it
inheritance
primitive variables
num=Integer.parseInt(str);
initialize
29. The names of the parameters in the header of the method declaration
constructors
formal parameters
character literal
variable
30. 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.
boolean equalsIgnoreCase (String str)
java.util class libary
assignment conversion
data values
31. The act of creating an object using the "new" operator
private
formal parameters
instantiation
attributes of an object
32. 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.
byte nextByte( )
class
reserved word void
boolean hasNext( )
33. Returns a new string consisting of this string concatenated with str.
attributes of an object
instance data
String toLowerCase ( )
String concat (String str)
34. sides=10;
boolean equals (String str)
Scanner useDelimiter(String pattern)
declared
assignment statement
35. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
reference
String toUpperCase ( )
method
self-governing
36. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
method
signed
not possible
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.
boolean equalsIgnoreCase (String str)
parameter list
String format (double number)
encapsulation
38. Instance data should be defined with what________ visibility
instance variable
private
uninitialized variables
floating point numbers
39. ++count; -- count
encapsulation of an object
pointer
aliases
prefix form
40. Boolean type conversions are ___________
not possible
mutator method
java.lang package
boolean equalsIgnoreCase (String str)
41. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
String (String str)
tokens
state of an object
string name;
42. 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)
NumberFormat class
private
constants
43. The values passed into a method in an invocation; these are called the arguments to the method
casting
actual parameters
byte nextByte( )
data values
44. White space characters such as space characters - tabs - and new lines that separate the elements of input
Scanner useDelimiter(String pattern)
int length( )
constructors
delimiters
45. Constants are ______ because the can't be changed once you use the final modifier
mutator method
assignment
string literal
public
46. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
attributes of an object
behaviors of an object
floating point numbers
boolean equals (String str)
47. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
num=Integer.parseInt(str);
called method
accessor method
reserved word void
48. Constructor: creates a new pseudorandom number generator.
operations
boolean hasNext( )
Random ( )
conditional statement
49. A ________________ is immutable.
String object
encapsulation of an object
declared
the "import" declaration
50. 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
delimiters
method
escape sequences
character literal