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. A class usually provides services to access and modify __________
RH
data values
pointer
import java.util*
2. Boolean type conversions are ___________
variable name
not possible
the "import" declaration
instance data
3. Expressed in a Java program with single quotes
character literal
string name;
boolean nextBoolean( )
parameter list
4. All numeric types are _______ - meaning both positive and negative values can be stored in them
double
service methods
signed
instance data
5. A value that is passed into a method when it is invoked
double
the "import" declaration
parameter
RH
6. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
class
constructors
enumerated type
boolean hasNext( )
7. Constructors do not even _______; therefore they cannot return a value.
character string
expression
have void
Scanner scan=new Scanner (System.in);
8. Returns the next input token as the indicated type.
byte nextByte( )
tokens
parameter
dot operator
9. Delimited by double quotation characters
string literal
casting
data values
literal
10. 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
boolean value
promotion
instantiation
Understanding
11. 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
num=Integer.parseInt(str);
boolean nextBoolean( )
encapsulation
12. 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.
polymorphism
autoboxing
expression
parameter list
13. 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 -
the DecimalFormat class
service methods
variable declaration
class
14. 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
promotion
instance data
boolean value
method
15. 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
long
casting
boolean equalsIgnoreCase (String str)
service methods
16. 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
conditionals
double
encapsulation of an object
Scanner class
17. 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
byte nextByte( )
Scanner scan=new Scanner (System.in);
pointer
called method
18. A name for a location in memory used to hold a data value.
escape sequences
static int parseInt (String str)
delimiters
variable
19. ______________ operators have higher precedence
behaviors of an object
underscores
arithmetic
actual parameters
20. Count++; count--
parameter list
polymorphism
postfix form
long
21. Returns all input remaining on the current line as a character string.
underscores
String nextLine( )
assignment
import java.util*
22. Instance data should be defined with what________ visibility
String concat (String str)
attributes of an object
private
called method
23. 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.
enumerated type
class level
not possible
String format (double number)
24. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
public
String replace (char oldChar - char newChar)
encapsulation of an object
initialize
25. A ________________ is immutable.
conditionals
String object
not possible
public
26. Returns true if the scanner has anotehr token in its input.
null
char charAt (int index)
casting
boolean hasNext( )
27. Begins with a backslash character ""
public
accessor method
String next( )
escape sequences
28. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
signed
enumerated type
state of an object
inheritance
29. White space characters such as space characters - tabs - and new lines that separate the elements of input
character string
arithmetic
uninitialized variables
delimiters
30. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
polymorphism
constants
assignment statement
parentheses
31. 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.
reserved word void
higher
constructors
instantiation
32. An explicit data value used in a program
import java.util*
called method
literal
wrapper class
33. Constructor: creates a new string object with the same characters as str.
parentheses
String (String str)
variable
boolean hasNext( )
34. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String toUpperCase ( )
Scanner useDelimiter(String pattern)
uninitialized variables
String replace (char oldChar - char newChar)
35. Methods in the Math class are ______
static
accessor method
called method
System.out.println
36. Variables that don't contain any data
uninitialized variables
string literal
parentheses
boolean equals (String str)
37. Each piece of data that we send to a method
NumberFormat class
conditionals
parameter
encapsulation
38. 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)
Scanner useDelimiter(String pattern)
parentheses
String format (double number)
39. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
promotion
string literal
constructors
behaviors of an object
40. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
have void
visibility modifiers
long
support methods
41. Two floating data types: float - _______
double
delimiters
aliases
class level
42. The one that is invoked
called method
conditional statement
boolean equals (String str)
parameter
43. A set of classes that supports the development of programs
character literal
autoboxing
class library
boolean equalsIgnoreCase (String str)
44. 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:
floating point numbers
instantiation
num=Integer.parseInt(str);
actual parameters
45. The act of creating an object using the "new" operator
wrapper class
Random class
instantiation
class
46. A null reference indicates that a variable does not refer to an object
null
a constructor
assignment statement
inheritance
47. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
variable declaration
instantiation
primitive variables
48. New memory space is reserved for that variable every time an instance of the class that is created.
visibility modifiers
instance data
NumberFormat class
String toUpperCase ( )
49. Returns a new string consisting of this string concatenated with str.
String substring (int offset - int endIndex)
long
NumberFormat class
String concat (String str)
50. 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
character string
boolean value
String nextLine( )
method declaration