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 the next input token as the indicated type.
reference
String object
byte nextByte( )
support methods
2. A set of classes that supports the development of programs
instantiation
method
class library
instance data
3. Three ways in which Java conversions occur: _________ conversion - promotion - casting
instantiation
character string
assignment
java.util class libary
4. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
variable
header of a method
floating point numbers
polymorphism
5. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
self-governing
method invocation
scope
instance variable
6. Four integer data types: byte - short - int - _____
inheritance
boolean value
long
formal parameters
7. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
String format (double number)
constants
boolean nextBoolean( )
service methods
8. 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.
delimiters
visibility modifiers
class library
instance variable
9. 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
attributes of an object
string name;
reference
enumerated type
10. Constructors do not even _______; therefore they cannot return a value.
have void
assignment conversion
variable
method invocation
11. 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
method declaration
inheritance
not possible
Random class
12. A class usually provides services to access and modify __________
data values
Scanner scan=new Scanner (System.in);
java.lang package
header of a method
13. This declaration creates a Scanner object that reads input from the keyboard
String concat (String str)
Random ( )
Scanner scan=new Scanner (System.in);
return statement
14. New memory space is reserved for that variable every time an instance of the class that is created.
String (String str)
conditionals
instance data
return statement
15. Two floating data types: float - _______
Random ( )
wrapper class
double
formal parameters
16. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String toLowerCase ( )
String findInLine (String pattern)
parentheses
Scanner scan=new Scanner (System.in);
17. sides=10;
operations
String nextLine( )
assignment conversion
assignment statement
18. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
floating point numbers
String substring (int offset - int endIndex)
byte nextByte( )
visibility modifiers
19. Returns the character at the specified index.
the DecimalFormat class
dot operator
Random class
char charAt (int index)
20. Returns all input remaining on the current line as a character string.
inheritance
String nextLine( )
formal parameters
promotion
21. The Scanner class is part of ___________________
arithmetic
local data
java.util class libary
String nextLine( )
22. Declared in a class but not inside any particular method
String replace (char oldChar - char newChar)
System.out.println
instance data
have void
23. Variables that don't contain any data
reserved word void
uninitialized variables
packages
called method
24. After an object has been instantiated - we set the _________ to access its methods
parentheses
support methods
dot operator
private
25. 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.
parameter list
attributes of an object
self-governing
variable
26. Count++; count--
aliases
support methods
have void
postfix form
27. 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
RH
class library
Understanding
parentheses
28. Each piece of data that we send to a method
prefix form
parameter
String object
String concat (String str)
29. Constants are ______ because the can't be changed once you use the final modifier
public
initialize
pointer
parameter
30. Returns the number of characters in this stirng.
parentheses
boolean nextBoolean( )
int length( )
local data
31. The act of creating an object using the "new" operator
prefix form
instantiation
char charAt (int index)
Random ( )
32. Elements of input
return statement
tokens
encapsulation of an object
boolean equals (String str)
33. Expressed in a Java program with single quotes
String concat (String str)
inheritance
have void
character literal
34. An object in Java - defined by the class String
byte nextByte( )
service methods
wrapper class
character string
35. 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
escape sequences
wrapper class
primitive variables
the "import" declaration
36. Begins with a backslash character ""
escape sequences
assignment
null
have void
37. 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.
casting
enumerated type
class
int length( )
38. The one that is invoked
NumberFormat class
called method
String next( )
assignment
39. System.out object represents an output device or file; we send the println message to the System.out object to request that some text be printed
System.out.println
String nextLine( )
method invocation
parentheses
40. The classes of the Java standard class library are grouped into __________.
service methods
boolean value
packages
java.util class libary
41. Widening byte: _________ - to int - to long - to float - to double
header of a method
byte to short
the "import" declaration
String replace (char oldChar - char newChar)
42. 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.
private
attributes of an object
polymorphism
String findInLine (String pattern)
43. Returns the next input token as a character string.
String findInLine (String pattern)
String next( )
local data
String substring (int offset - int endIndex)
44. 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
reserved word void
actual parameters
String substring (int offset - int endIndex)
aliases
45. We use an object when we have a _________ to it
String object
service methods
flow of control
reference
46. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
method invocation
constants
String object
47. Returns true if the scanner has anotehr token in its input.
boolean value
underscores
boolean hasNext( )
polymorphism
48. Boolean type conversions are ___________
the DecimalFormat class
not possible
Random class
string name;
49. ++count; -- count
primitive variables
prefix form
service methods
instance data
50. 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.
scope
reserved word void
promotion
Scanner useDelimiter(String pattern)