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 a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
behaviors of an object
enumerated type
floating point numbers
2. The classes of the Java standard class library are grouped into __________.
packages
parameter
class library
primitive variables
3. Variables that don't contain any data
uninitialized variables
String (String str)
boolean value
Random class
4. 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
support methods
string name;
String next( )
state of an object
5. Before you use a variable __________it
initialize
flow of control
String concat (String str)
variable name
6. Elements of input
tokens
literal
polymorphism
return statement
7. Cast operator has _________ precedence to division
floating point numbers
higher
a constructor
delimiters
8. Returns all input remaining on the current line as a character string.
boolean hasNext( )
String nextLine( )
formal parameters
casting
9. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
floating point numbers
parameter
delimiters
10. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
called method
not possible
variable
11. A null reference indicates that a variable does not refer to an object
public
support methods
null
int length( )
12. A ________________ is immutable.
String object
casting
expression
num=Integer.parseInt(str);
13. New memory space is reserved for that variable every time an instance of the class that is created.
pointer
return statement
state of an object
instance data
14. 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
inheritance
enumerated type
variable name
String concat (String str)
15. Four integer data types: byte - short - int - _____
char charAt (int index)
static
long
int compareTo (String str)
16. 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.
Scanner useDelimiter(String pattern)
return statement
boolean hasNext( )
polymorphism
17. Constructor: creates a new pseudorandom number generator.
String substring (int offset - int endIndex)
java.lang package
state of an object
Random ( )
18. Modifier>type/void>identifier>parameters>method body
instance data
method declaration
Scanner class
character string
19. Two floating data types: float - _______
Scanner class
double
String next( )
String findInLine (String pattern)
20. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
mutator method
tokens
method declaration
promotion
21. 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
reference
parameter
uninitialized variables
aliases
22. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
String next( )
parameter list
Understanding
floating point numbers
23. 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
String replace (char oldChar - char newChar)
Scanner class
Understanding
method
24. Every object has two things: a state and a _____ of behaviors
attributes of an object
set
string literal
pointer
25. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
boolean value
assignment statement
instance variable
accessor method
26. An explicit data value used in a program
assignment conversion
literal
prefix form
boolean nextBoolean( )
27. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
Scanner useDelimiter(String pattern)
state of an object
constructors
String (String str)
28. format for constants: all upper-case; separated by ________
underscores
promotion
public
assignment conversion
29. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
byte nextByte( )
dot operator
String replace (char oldChar - char newChar)
String toUpperCase ( )
30. Count++; count--
aliases
postfix form
Scanner class
int length( )
31. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
private
num=Integer.parseInt(str);
called method
32. 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
Understanding
java.lang package
class level
have void
33. The values passed into a method in an invocation; these are called the arguments to the method
boolean hasNext( )
actual parameters
variable declaration
not possible
34. Returns the next input token as the indicated type.
byte nextByte( )
state of an object
have void
attributes of an object
35. A set of classes that supports the development of programs
enumerated type
String format (double number)
class library
not possible
36. An object in Java - defined by the class String
state of an object
character string
actual parameters
String format (double number)
37. Two categories of statements that control the flow of executing through a method: __________ and loops
static int parseInt (String str)
Scanner class
conditionals
higher
38. 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
wrapper class
String (String str)
a constructor
39. 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.
encapsulation
header of a method
instantiation
floating point numbers
40. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
operations
support methods
instance data
41. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
encapsulation
constructors
import java.util*
enumerated type
42. Instance data should be defined with what________ visibility
String findInLine (String pattern)
String substring (int offset - int endIndex)
private
double
43. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
primitive variables
instance variable
boolean value
44. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
instance data
formal parameters
Understanding
45. The act of creating an object using the "new" operator
a constructor
Scanner scan=new Scanner (System.in);
instantiation
formal parameters
46. ++count; -- count
data values
prefix form
uninitialized variables
support methods
47. 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
java.lang package
constants
parentheses
wrapper class
48. sides=10;
assignment statement
polymorphism
expression
delimiters
49. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
boolean value
reference
long
50. 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)
the "import" declaration
assignment statement
parameter list