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. Begins with a backslash character ""
local data
String toLowerCase ( )
escape sequences
prefix form
2. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can
Scanner class
the DecimalFormat class
String substring (int offset - int endIndex)
promotion
3. Represents either a primitive value or an object
delimiters
Understanding
variable name
class library
4. Returns the next input token as the indicated type.
instance data
byte nextByte( )
packages
set
5. Attempts to find the next occurence of the specified pattern - ignoring delimiters
Scanner scan=new Scanner (System.in);
double
class level
String findInLine (String pattern)
6. 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
assignment statement
casting
boolean hasNext( )
flow of control
7. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
escape sequences
double
state of an object
8. Before you use a variable __________it
initialize
called method
String format (double number)
null
9. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
Random class
Scanner class
String toUpperCase ( )
10. 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
expression
floating point numbers
state of an object
Understanding
11. Returns true if the scanner has anotehr token in its input.
String toUpperCase ( )
visibility modifiers
method invocation
boolean hasNext( )
12. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
promotion
self-governing
expression
character string
13. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
casting
inheritance
System.out.println
14. sides=10;
String replace (char oldChar - char newChar)
null
wrapper class
assignment statement
15. Constructors do not even _______; therefore they cannot return a value.
string literal
have void
declared
inheritance
16. format for constants: all upper-case; separated by ________
String findInLine (String pattern)
method declaration
underscores
String (String str)
17. 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 format (double number)
Understanding
class level
String next( )
18. 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
literal
variable declaration
pointer
inheritance
19. New memory space is reserved for that variable every time an instance of the class that is created.
parameter list
static
instance data
uninitialized variables
20. 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
higher
encapsulation of an object
assignment statement
21. The declarations of object variables have a similar structure to the declaration of _______________
int compareTo (String str)
String nextLine( )
primitive variables
a constructor
22. When a variable is declared inside a method
String object
character string
local data
null
23. Returns a new string consisting of this string concatenated with str.
String concat (String str)
attributes of an object
assignment conversion
character string
24. 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
pointer
String (String str)
data values
dot operator
25. Each piece of data that we send to a method
parameter
String (String str)
primitive variables
private
26. We use an object when we have a _________ to it
a constructor
variable
local data
reference
27. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
escape sequences
the "import" declaration
reserved word void
instantiation
28. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
instance data
variable name
constants
29. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
scope
self-governing
boolean nextBoolean( )
30. Returns the character at the specified index.
accessor method
literal
called method
char charAt (int index)
31. A method that returns a value must have a _________
return statement
boolean equals (String str)
String toLowerCase ( )
attributes of an object
32. Methods in the Math class are ______
method declaration
String substring (int offset - int endIndex)
static
operations
33. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
private
variable name
instance data
34. Cast operator has _________ precedence to division
higher
casting
conditional statement
not possible
35. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
postfix form
boolean equalsIgnoreCase (String str)
method invocation
Random class
36. Four integer data types: byte - short - int - _____
String findInLine (String pattern)
parameter
service methods
long
37. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
private
support methods
mutator method
static
38. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
the DecimalFormat class
behaviors of an object
support methods
39. 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
method
string name;
java.util class libary
constants
40. 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 -
variable name
int length( )
actual parameters
class
41. Boolean type conversions are ___________
private
not possible
java.lang package
dot operator
42. An object has behaviors - which are defined by the ________ associated with that object.
String format (double number)
mutator method
promotion
operations
43. Constructor: creates a new pseudorandom number generator.
tokens
behaviors of an object
Random ( )
Understanding
44. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
num=Integer.parseInt(str);
String object
string name;
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.
expression
enumerated type
Random class
boolean equalsIgnoreCase (String str)
46. 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
return statement
boolean value
primitive variables
double
47. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
underscores
accessor method
signed
48. ++count; -- count
autoboxing
the "import" declaration
String toLowerCase ( )
prefix form
49. 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.
boolean hasNext( )
wrapper class
reserved word void
reference
50. Returns a string containing the specified number formatted according to this object's pattern.
enumerated type
String format (double number)
boolean value
accessor method