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. Widening byte: _________ - to int - to long - to float - to double
String format (double number)
boolean hasNext( )
byte to short
initialize
2. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
set
scope
autoboxing
3. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
the DecimalFormat class
attributes of an object
accessor method
4. 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
Random ( )
System.out.println
String toUpperCase ( )
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.
visibility modifiers
variable name
boolean nextBoolean( )
enumerated type
6. Boolean type conversions are ___________
not possible
string literal
boolean equals (String str)
the "import" declaration
7. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
java.lang package
NumberFormat class
constructors
set
8. After an object has been instantiated - we set the _________ to access its methods
class
dot operator
higher
character literal
9. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
NumberFormat class
reserved word void
java.lang package
packages
10. Returns a new string consisting of this string concatenated with str.
Understanding
boolean equals (String str)
class library
Scanner scan=new Scanner (System.in);
11. A set of classes that supports the development of programs
boolean equals (String str)
a constructor
class library
reserved word void
12. Count++; count--
parameter
variable
method declaration
postfix form
13. 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:
assignment statement
boolean equals (String str)
num=Integer.parseInt(str);
constructors
14. 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.
service methods
character string
parameter list
behaviors of an object
15. All numeric types are _______ - meaning both positive and negative values can be stored in them
flow of control
actual parameters
Understanding
signed
16. 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
boolean value
method declaration
byte nextByte( )
pointer
17. 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.
parameter list
polymorphism
null
Scanner class
18. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
enumerated type
the "import" declaration
string name;
parentheses
19. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
flow of control
method invocation
scope
set
20. Instance data should be defined with what________ visibility
assignment conversion
literal
private
byte nextByte( )
21. Three ways in which Java conversions occur: _________ conversion - promotion - casting
reserved word void
conditionals
long
assignment
22. Constructors do not even _______; therefore they cannot return a value.
class
scope
pointer
have void
23. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
dot operator
header of a method
instantiation
visibility modifiers
24. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
reference
boolean hasNext( )
accessor method
instance variable
25. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
java.lang package
int compareTo (String str)
assignment
import java.util*
26. Each piece of data that we send to a method
floating point numbers
parameter
higher
RH
27. The act of creating an object using the "new" operator
higher
instantiation
string literal
assignment statement
28. Expressed in a Java program with single quotes
casting
character literal
string literal
Understanding
29. Modifier>type/void>identifier>parameters>method body
char charAt (int index)
string literal
java.lang package
method declaration
30. Returns the character at the specified index.
char charAt (int index)
packages
static int parseInt (String str)
operations
31. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
data values
constructors
literal
32. Two floating data types: float - _______
called method
Random class
expression
double
33. 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
polymorphism
String substring (int offset - int endIndex)
string name;
tokens
34. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
boolean equals (String str)
method declaration
state of an object
java.lang package
35. The values passed into a method in an invocation; these are called the arguments to the method
actual parameters
postfix form
attributes of an object
constants
36. Variables that don't contain any data
private
uninitialized variables
accessor method
boolean equalsIgnoreCase (String str)
37. 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
java.lang package
java.util class libary
38. 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.
delimiters
formal parameters
encapsulation
operations
39. 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
variable name
long
boolean equalsIgnoreCase (String str)
Understanding
40. The names of the parameters in the header of the method declaration
formal parameters
accessor method
assignment
dot operator
41. Part of the java.util class; picks a number at random out of a range of values.
public
reference
Random class
Scanner scan=new Scanner (System.in);
42. Delimited by double quotation characters
String object
declared
string literal
int compareTo (String str)
43. Elements of input
dot operator
initialize
packages
tokens
44. Returns a new string consisting of this string concatenated with str.
header of a method
underscores
String concat (String str)
a constructor
45. Declared in a class but not inside any particular method
parameter
parameter list
instance data
String concat (String str)
46. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
System.out.println
set
return statement
boolean equalsIgnoreCase (String str)
47. Constructor: creates a new string object with the same characters as str.
instance variable
char charAt (int index)
String (String str)
method invocation
48. Methods in the Math class are ______
static
dot operator
java.lang package
import java.util*
49. Returns the next input token as the indicated type.
byte nextByte( )
self-governing
long
boolean hasNext( )
50. Constructor: creates a new pseudorandom number generator.
Random ( )
arithmetic
parameter
static int parseInt (String str)