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 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
method
mutator method
polymorphism
dot operator
2. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
reference
enumerated type
variable name
3. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
escape sequences
dot operator
initialize
promotion
4. The order in which statements are executed in a running program
called method
flow of control
private
parameter
5. Modifier>type/void>identifier>parameters>method body
delimiters
method declaration
double
instantiation
6. When a variable is declared inside a method
instance data
local data
data values
boolean nextBoolean( )
7. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
instance variable
the "import" declaration
service methods
assignment conversion
8. All wrapper classes are defined in ___________
import java.util*
local data
method invocation
java.lang package
9. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
static int parseInt (String str)
java.util class libary
self-governing
10. Elements of input
delimiters
accessor method
tokens
the "import" declaration
11. Before you use a variable __________it
scope
assignment
instance variable
initialize
12. Attempts to find the next occurence of the specified pattern - ignoring delimiters
assignment conversion
String findInLine (String pattern)
uninitialized variables
boolean equalsIgnoreCase (String str)
13. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
promotion
character literal
boolean equalsIgnoreCase (String str)
14. Returns a new string consisting of this string concatenated with str.
reference
accessor method
boolean equals (String str)
Random class
15. Every object has two things: a state and a _____ of behaviors
the DecimalFormat class
set
formal parameters
variable
16. Part of the java.util class; picks a number at random out of a range of values.
instance variable
escape sequences
boolean nextBoolean( )
Random class
17. The names of the parameters in the header of the method declaration
parameter
int compareTo (String str)
formal parameters
service methods
18. Constructor: creates a new string object with the same characters as str.
self-governing
String (String str)
char charAt (int index)
literal
19. Cast operator has _________ precedence to division
higher
assignment
java.util class libary
string name;
20. Also called a selection statement b/c it allows us to choose which statement will be executed next.
set
conditional statement
called method
String format (double number)
21. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
java.lang package
scope
data values
floating point numbers
22. 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
assignment conversion
Scanner class
primitive variables
reference
23. ____________ is instantiated in the traditional way using the new operator.
method
character string
string name;
the DecimalFormat class
24. 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.
called method
java.lang package
enumerated type
declared
25. Delimited by double quotation characters
java.lang package
primitive variables
string literal
higher
26. Boolean type conversions are ___________
expression
method invocation
not possible
num=Integer.parseInt(str);
27. Begins with a backslash character ""
java.lang package
escape sequences
attributes of an object
have void
28. 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 next( )
variable declaration
Understanding
29. An object in Java - defined by the class String
character string
accessor method
import java.util*
arithmetic
30. A ________________ is immutable.
underscores
Scanner class
String object
boolean nextBoolean( )
31. Sets the scanner's delimiting pattern.
operations
Random ( )
Scanner useDelimiter(String pattern)
encapsulation
32. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
formal parameters
support methods
inheritance
String toUpperCase ( )
33. 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
packages
method invocation
aliases
actual parameters
34. Returns all input remaining on the current line as a character string.
parameter
operations
String nextLine( )
null
35. Declared in a class but not inside any particular method
parentheses
instantiation
instance data
String findInLine (String pattern)
36. An explicit data value used in a program
higher
the DecimalFormat class
literal
string name;
37. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
declared
assignment statement
null
38. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
int compareTo (String str)
byte nextByte( )
postfix form
state of an object
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
set
System.out.println
class library
Random class
40. Methods in the Math class are ______
attributes of an object
static
Scanner useDelimiter(String pattern)
private
41. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
character string
self-governing
encapsulation of an object
parameter
42. Count++; count--
postfix form
polymorphism
byte to short
method invocation
43. A value that is passed into a method when it is invoked
import java.util*
num=Integer.parseInt(str);
parameter
String next( )
44. This declaration creates a Scanner object that reads input from the keyboard
method
Scanner scan=new Scanner (System.in);
character literal
header of a method
45. 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
instantiation
class library
flow of control
wrapper class
46. 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.
local data
variable name
String nextLine( )
encapsulation
47. Expressed in a Java program with single quotes
character string
variable declaration
primitive variables
character literal
48. They clarify the role a certain number has in the program.
constants
class level
String (String str)
boolean nextBoolean( )
49. Returns true if the scanner has anotehr token in its input.
wrapper class
method invocation
boolean hasNext( )
operations
50. ______________ operators have higher precedence
Random ( )
String replace (char oldChar - char newChar)
arithmetic
data values