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. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
instantiation
NumberFormat class
accessor method
boolean equalsIgnoreCase (String str)
2. The values passed into a method in an invocation; these are called the arguments to the method
instance data
assignment
actual parameters
byte nextByte( )
3. Returns the next input token as the indicated type.
null
service methods
byte nextByte( )
parameter list
4. Returns the character at the specified index.
boolean hasNext( )
not possible
expression
char charAt (int index)
5. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
String findInLine (String pattern)
private
Scanner scan=new Scanner (System.in);
6. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
parameter
formal parameters
String toUpperCase ( )
behaviors of an object
7. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
a constructor
return statement
service methods
boolean equals (String str)
8. A name for a location in memory used to hold a data value.
encapsulation of an object
operations
variable name
variable
9. White space characters such as space characters - tabs - and new lines that separate the elements of input
a constructor
String object
private
delimiters
10. Boolean type conversions are ___________
instantiation
not possible
private
method declaration
11. All numeric types are _______ - meaning both positive and negative values can be stored in them
called method
local data
signed
variable declaration
12. The names of the parameters in the header of the method declaration
reference
local data
formal parameters
instance data
13. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
method invocation
dot operator
aliases
state of an object
14. A variable that refers to an object must be __________
reference
declared
encapsulation
String (String str)
15. Returns the int corresponding to the value stored in the specified string
parameter
polymorphism
flow of control
static int parseInt (String str)
16. Delimited by double quotation characters
method declaration
wrapper class
string literal
long
17. format for constants: all upper-case; separated by ________
postfix form
String object
class library
underscores
18. A null reference indicates that a variable does not refer to an object
boolean hasNext( )
postfix form
instance variable
null
19. 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.
class
constructors
polymorphism
instantiation
20. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
formal parameters
parameter list
Scanner scan=new Scanner (System.in);
21. Variables and constants can be referenced in any method of the class by declaring at the _________
parameter list
Scanner class
local data
class level
22. Elements of input
static
visibility modifiers
tokens
string name;
23. An explicit data value used in a program
parentheses
primitive variables
literal
conditional statement
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 -
static
class
the "import" declaration
enumerated type
25. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
static int parseInt (String str)
import java.util*
not possible
operations
26. When a variable is declared inside a method
local data
prefix form
delimiters
accessor method
27. Provide various methods related to the management of the associated primitive type. Used when we create an object that serves as a container to hold various types of other objects - and we want the object to hold a simple integer value. In this case
character string
byte to short
wrapper class
reserved word void
28. Widening byte: _________ - to int - to long - to float - to double
service methods
byte to short
String format (double number)
long
29. 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:
have void
public
return statement
num=Integer.parseInt(str);
30. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String nextLine( )
String replace (char oldChar - char newChar)
behaviors of an object
escape sequences
31. Returns the next input token as the indicated type.
constants
boolean nextBoolean( )
expression
self-governing
32. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
string literal
constructors
NumberFormat class
33. Sets the scanner's delimiting pattern.
boolean hasNext( )
String object
Scanner useDelimiter(String pattern)
int length( )
34. Returns the next input token as a character string.
instance variable
self-governing
encapsulation of an object
String next( )
35. The Scanner class is part of ___________________
java.util class libary
a constructor
assignment conversion
String object
36. Two categories of statements that control the flow of executing through a method: __________ and loops
java.util class libary
prefix form
import java.util*
conditionals
37. Modifier>type/void>identifier>parameters>method body
boolean nextBoolean( )
attributes of an object
instance data
method declaration
38. 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
operations
Understanding
java.util class libary
double
39. A ________________ is immutable.
method invocation
String object
parameter
operations
40. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
mutator method
String substring (int offset - int endIndex)
long
the "import" declaration
41. They clarify the role a certain number has in the program.
parameter
instance data
constants
scope
42. 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
int length( )
variable name
expression
43. _____ expression evaluated first
have void
initialize
RH
String substring (int offset - int endIndex)
44. 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
autoboxing
inheritance
promotion
constants
45. New memory space is reserved for that variable every time an instance of the class that is created.
boolean equalsIgnoreCase (String str)
instance data
boolean nextBoolean( )
literal
46. ++count; -- count
service methods
primitive variables
boolean value
prefix form
47. All wrapper classes are defined in ___________
String object
static int parseInt (String str)
java.lang package
String toUpperCase ( )
48. Declared in a class but not inside any particular method
byte to short
String (String str)
instance data
primitive variables
49. 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.
public
enumerated type
behaviors of an object
assignment conversion
50. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
encapsulation
accessor method
declared
encapsulation of an object