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. format for constants: all upper-case; separated by ________
visibility modifiers
String toUpperCase ( )
underscores
Scanner class
2. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
class library
expression
variable
constructors
3. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
NumberFormat class
static int parseInt (String str)
self-governing
String nextLine( )
4. Returns the next input token as the indicated type.
encapsulation of an object
assignment conversion
byte nextByte( )
data values
5. Constants are ______ because the can't be changed once you use the final modifier
Scanner scan=new Scanner (System.in);
String toUpperCase ( )
public
character string
6. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
polymorphism
attributes of an object
not possible
the "import" declaration
7. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
declared
String next( )
called method
floating point numbers
8. Begins with a backslash character ""
higher
boolean nextBoolean( )
escape sequences
delimiters
9. 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.
signed
visibility modifiers
return statement
string name;
10. Returns the int corresponding to the value stored in the specified string
constants
static int parseInt (String str)
NumberFormat class
reference
11. Returns a new string consisting of this string concatenated with str.
String object
String concat (String str)
reference
String toLowerCase ( )
12. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
uninitialized variables
method
int compareTo (String str)
13. Elements of input
tokens
character string
java.util class libary
Understanding
14. Returns the next input token as the indicated type.
actual parameters
String substring (int offset - int endIndex)
NumberFormat class
boolean nextBoolean( )
15. Two floating data types: float - _______
flow of control
double
Understanding
class library
16. Returns the next input token as a character string.
String next( )
boolean value
assignment
String format (double number)
17. 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
postfix form
boolean equals (String str)
header of a method
18. 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
int compareTo (String str)
wrapper class
header of a method
primitive variables
19. Constructor: creates a new pseudorandom number generator.
enumerated type
Random ( )
visibility modifiers
class level
20. 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
instance variable
underscores
pointer
literal
21. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
assignment statement
dot operator
expression
int compareTo (String str)
22. Modifier>type/void>identifier>parameters>method body
method declaration
assignment
String findInLine (String pattern)
pointer
23. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
instance variable
scope
method
24. New memory space is reserved for that variable every time an instance of the class that is created.
java.lang package
instance data
mutator method
variable name
25. Expressed in a Java program with single quotes
scope
a constructor
Scanner scan=new Scanner (System.in);
character literal
26. All wrapper classes are defined in ___________
java.lang package
java.util class libary
the "import" declaration
instance variable
27. Before you use a variable __________it
initialize
mutator method
int compareTo (String str)
expression
28. 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
literal
conditional statement
string name;
autoboxing
29. Returns the character at the specified index.
dot operator
character literal
long
char charAt (int index)
30. sides=10;
operations
assignment statement
String nextLine( )
double
31. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
tokens
Understanding
assignment conversion
32. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
character string
higher
aliases
33. Returns the number of characters in this stirng.
self-governing
int length( )
static int parseInt (String str)
aliases
34. Four integer data types: byte - short - int - _____
string name;
class level
service methods
long
35. Sets the scanner's delimiting pattern.
String concat (String str)
Scanner useDelimiter(String pattern)
called method
initialize
36. 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
conditional statement
flow of control
System.out.println
the DecimalFormat class
37. 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
string literal
parameter
have void
38. A ________________ is immutable.
String object
packages
operations
inheritance
39. The names of the parameters in the header of the method declaration
NumberFormat class
inheritance
formal parameters
conditional statement
40. A set of classes that supports the development of programs
the "import" declaration
public
declared
class library
41. 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
Scanner class
data values
String replace (char oldChar - char newChar)
String substring (int offset - int endIndex)
42. They clarify the role a certain number has in the program.
constants
expression
initialize
floating point numbers
43. A combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data
import java.util*
String toLowerCase ( )
expression
not possible
44. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String replace (char oldChar - char newChar)
actual parameters
String concat (String str)
Scanner class
45. After an object has been instantiated - we set the _________ to access its methods
dot operator
character string
byte to short
Random class
46. 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
formal parameters
constructors
byte to short
47. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
underscores
public
static
48. 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.
assignment conversion
boolean hasNext( )
variable declaration
instance data
49. A class usually provides services to access and modify __________
underscores
boolean equalsIgnoreCase (String str)
char charAt (int index)
data values
50. When a variable is declared inside a method
java.lang package
local data
visibility modifiers
packages