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 name for a location in memory used to hold a data value.
formal parameters
Scanner useDelimiter(String pattern)
variable declaration
variable
2. Represents either a primitive value or an object
underscores
header of a method
pointer
variable name
3. The values passed into a method in an invocation; these are called the arguments to the method
java.util class libary
conditionals
data values
actual parameters
4. Each piece of data that we send to a method
String object
char charAt (int index)
parameter
encapsulation of an object
5. Constructor: creates a new string object with the same characters as str.
Understanding
String (String str)
double
operations
6. New memory space is reserved for that variable every time an instance of the class that is created.
NumberFormat class
instance data
variable name
variable declaration
7. Part of the java.util class; picks a number at random out of a range of values.
Random class
num=Integer.parseInt(str);
reserved word void
boolean nextBoolean( )
8. 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
higher
parentheses
instance data
inheritance
9. 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
string name;
parentheses
String object
method
10. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
flow of control
instance variable
NumberFormat class
uninitialized variables
11. A special method that has the same name as the class. After the "new" operator creates the object it is invoked to help set it up initially
java.util class libary
actual parameters
a constructor
int length( )
12. Variables and constants can be referenced in any method of the class by declaring at the _________
class level
NumberFormat class
boolean equalsIgnoreCase (String str)
int compareTo (String str)
13. 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
casting
import java.util*
System.out.println
boolean hasNext( )
14. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
aliases
called method
instance data
15. Two floating data types: float - _______
encapsulation of an object
String toLowerCase ( )
double
parameter list
16. Returns the next input token as a character string.
set
string name;
static
String next( )
17. 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
byte to short
floating point numbers
assignment statement
18. 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.
String toUpperCase ( )
scope
static
tokens
19. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
parameter
boolean value
local data
String substring (int offset - int endIndex)
20. They clarify the role a certain number has in the program.
called method
constants
attributes of an object
Scanner class
21. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
data values
encapsulation of an object
support methods
character literal
22. Declared in a class but not inside any particular method
higher
instance data
service methods
static
23. A ________________ is immutable.
String object
parameter
constants
data values
24. 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
string name;
java.util class libary
actual parameters
header of a method
25. 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
promotion
service methods
variable
encapsulation of an object
26. All numeric types are _______ - meaning both positive and negative values can be stored in them
parameter
RH
signed
double
27. 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
method invocation
delimiters
System.out.println
packages
28. When a variable is declared inside a method
String replace (char oldChar - char newChar)
local data
int length( )
scope
29. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
java.lang package
literal
state of an object
char charAt (int index)
30. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
dot operator
String toLowerCase ( )
boolean value
NumberFormat class
31. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
literal
instantiation
reference
32. Returns the next input token as the indicated type.
String nextLine( )
long
boolean nextBoolean( )
expression
33. White space characters such as space characters - tabs - and new lines that separate the elements of input
boolean nextBoolean( )
flow of control
delimiters
method
34. ____________ is instantiated in the traditional way using the new operator.
Scanner scan=new Scanner (System.in);
the DecimalFormat class
instance variable
support methods
35. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used
floating point numbers
Scanner class
method invocation
escape sequences
36. The classes of the Java standard class library are grouped into __________.
class
packages
instantiation
support methods
37. Expressed in a Java program with single quotes
character literal
String concat (String str)
local data
boolean hasNext( )
38. 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
byte to short
RH
conditionals
39. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
String (String str)
java.lang package
parentheses
variable declaration
40. 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
uninitialized variables
static int parseInt (String str)
mutator method
aliases
41. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
String nextLine( )
int compareTo (String str)
assignment statement
NumberFormat class
42. Before you use a variable __________it
String object
accessor method
state of an object
initialize
43. The order in which statements are executed in a running program
primitive variables
underscores
flow of control
behaviors of an object
44. Widening byte: _________ - to int - to long - to float - to double
actual parameters
polymorphism
wrapper class
byte to short
45. The values it stores internally - which may be represented as primitive data or as other objects. for example - a bank account object can store a floating point number (a primitive value) that represents the balance of the account. it can also contai
attributes of an object
visibility modifiers
literal
assignment statement
46. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
the "import" declaration
constructors
accessor method
character literal
47. Sets the scanner's delimiting pattern.
int compareTo (String str)
arithmetic
Scanner useDelimiter(String pattern)
constructors
48. 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.
boolean equalsIgnoreCase (String str)
parameter list
scope
instantiation
49. _____ expression evaluated first
the DecimalFormat class
String format (double number)
local data
RH
50. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
String findInLine (String pattern)
method
self-governing
the "import" declaration