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 Scanner class is part of ___________________
java.util class libary
boolean value
pointer
floating point numbers
2. Returns a new string consisting of this string concatenated with str.
String concat (String str)
inheritance
delimiters
wrapper class
3. 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
num=Integer.parseInt(str);
assignment conversion
Understanding
delimiters
4. Delimited by double quotation characters
string literal
flow of control
NumberFormat class
actual parameters
5. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
character literal
import java.util*
promotion
double
6. An object in Java - defined by the class String
wrapper class
conditionals
underscores
character string
7. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
String object
polymorphism
int compareTo (String str)
autoboxing
8. format for constants: all upper-case; separated by ________
parameter
String toLowerCase ( )
delimiters
underscores
9. 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
encapsulation
assignment statement
int compareTo (String str)
10. Cast operator has _________ precedence to division
have void
floating point numbers
called method
higher
11. 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.
method declaration
polymorphism
byte to short
assignment
12. Count++; count--
String findInLine (String pattern)
parameter list
variable name
postfix form
13. Returns the next input token as the indicated type.
literal
boolean equals (String str)
double
boolean nextBoolean( )
14. Returns the character at the specified index.
packages
postfix form
scope
char charAt (int index)
15. Returns the number of characters in this stirng.
int length( )
static int parseInt (String str)
assignment statement
signed
16. A set of classes that supports the development of programs
class library
boolean value
assignment statement
variable
17. Two floating data types: float - _______
uninitialized variables
double
Random class
postfix form
18. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location
variable declaration
the DecimalFormat class
Scanner scan=new Scanner (System.in);
method
19. 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.
visibility modifiers
primitive variables
import java.util*
wrapper class
20. 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
instantiation
not possible
delimiters
inheritance
21. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
delimiters
constants
static
String substring (int offset - int endIndex)
22. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
higher
the DecimalFormat class
formal parameters
23. Constructor: creates a new string object with the same characters as str.
behaviors of an object
double
String (String str)
Random ( )
24. 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 -
class
String replace (char oldChar - char newChar)
the DecimalFormat class
variable
25. Begins with a backslash character ""
escape sequences
class level
class library
String substring (int offset - int endIndex)
26. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
header of a method
assignment
floating point numbers
27. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
instance data
String toLowerCase ( )
NumberFormat class
boolean nextBoolean( )
28. A ________________ is immutable.
static int parseInt (String str)
called method
String object
pointer
29. Expressed in a Java program with single quotes
attributes of an object
character literal
signed
String nextLine( )
30. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
service methods
character literal
prefix form
behaviors of an object
31. Changes a particular value - e.g.setX - where X is the value they are setting.
character literal
local data
mutator method
pointer
32. Returns all input remaining on the current line as a character string.
data values
string name;
String format (double number)
String nextLine( )
33. ____________ is instantiated in the traditional way using the new operator.
String toUpperCase ( )
byte nextByte( )
reference
the DecimalFormat class
34. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
System.out.println
num=Integer.parseInt(str);
casting
boolean equals (String str)
35. 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
static
variable
expression
floating point numbers
36. The values passed into a method in an invocation; these are called the arguments to the method
variable declaration
num=Integer.parseInt(str);
actual parameters
header of a method
37. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
service methods
expression
uninitialized variables
parentheses
38. An object has behaviors - which are defined by the ________ associated with that object.
pointer
static
boolean equalsIgnoreCase (String str)
operations
39. We use an object when we have a _________ to it
private
string name;
NumberFormat class
reference
40. Represents either a primitive value or an object
accessor method
variable name
literal
class level
41. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
constants
uninitialized variables
polymorphism
self-governing
42. A name for a location in memory used to hold a data value.
escape sequences
boolean nextBoolean( )
variable
reserved word void
43. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
Random ( )
parameter
NumberFormat class
polymorphism
44. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
packages
import java.util*
Scanner class
instantiation
45. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
byte to short
autoboxing
local data
46. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
conditional statement
escape sequences
java.lang package
constructors
47. Widening byte: _________ - to int - to long - to float - to double
byte to short
data values
header of a method
string name;
48. Returns the next input token as a character string.
underscores
System.out.println
String next( )
String findInLine (String pattern)
49. Instance data should be defined with what________ visibility
pointer
private
string name;
the DecimalFormat class
50. Constants are ______ because the can't be changed once you use the final modifier
character literal
service methods
public
flow of control