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 combo of one or more operators and operands that usually perform a calculation; operands can be literals - constants - variables - or other sources of data
expression
String (String str)
primitive variables
a constructor
2. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
String object
service methods
support methods
string name;
3. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String findInLine (String pattern)
RH
return statement
String toLowerCase ( )
4. 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
underscores
escape sequences
String toUpperCase ( )
variable declaration
5. Elements of input
tokens
Scanner scan=new Scanner (System.in);
enumerated type
postfix form
6. 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.
header of a method
encapsulation
initialize
parameter list
7. The Scanner class is part of ___________________
instance data
RH
java.util class libary
Understanding
8. 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
parameter
a constructor
promotion
encapsulation of an object
9. Returns true if the scanner has anotehr token in its input.
header of a method
boolean hasNext( )
java.util class libary
return statement
10. sides=10;
assignment
actual parameters
assignment statement
method invocation
11. When a variable is declared inside a method
boolean equals (String str)
instance data
local data
class
12. A class usually provides services to access and modify __________
data values
delimiters
method
boolean value
13. Constructor: creates a new string object with the same characters as str.
assignment statement
java.lang package
num=Integer.parseInt(str);
String (String str)
14. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
the DecimalFormat class
declared
parentheses
a constructor
15. Constructors do not even _______; therefore they cannot return a value.
character literal
have void
public
Random class
16. Two categories of statements that control the flow of executing through a method: __________ and loops
the DecimalFormat class
conditionals
signed
string name;
17. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
called method
long
promotion
the DecimalFormat class
18. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
character literal
encapsulation
accessor method
pointer
19. The act of creating an object using the "new" operator
instantiation
string name;
the DecimalFormat class
constructors
20. Returns the character at the specified index.
Scanner class
behaviors of an object
char charAt (int index)
instantiation
21. A ________________ is immutable.
java.util class libary
String object
instance variable
delimiters
22. Variables that don't contain any data
underscores
uninitialized variables
double
actual parameters
23. The values passed into a method in an invocation; these are called the arguments to the method
flow of control
actual parameters
mutator method
byte to short
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;
accessor method
class library
String next( )
25. 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
instantiation
uninitialized variables
variable declaration
casting
26. 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.
constructors
scope
method
class library
27. 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)
behaviors of an object
not possible
data values
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 -
support methods
parameter
assignment statement
class
29. A null reference indicates that a variable does not refer to an object
null
assignment
pointer
encapsulation of an object
30. The declarations of object variables have a similar structure to the declaration of _______________
behaviors of an object
parameter
import java.util*
primitive variables
31. The automatic conversion between a primitive value and a corresponding wrapper object.
variable
autoboxing
flow of control
expression
32. Begins with a backslash character ""
string literal
formal parameters
escape sequences
local data
33. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
instance variable
wrapper class
attributes of an object
NumberFormat class
34. Count++; count--
postfix form
variable declaration
declared
signed
35. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
instance data
method declaration
delimiters
the "import" declaration
36. Variables and constants can be referenced in any method of the class by declaring at the _________
parameter list
String findInLine (String pattern)
class level
the DecimalFormat class
37. 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
string name;
assignment statement
primitive variables
wrapper class
38. All numeric types are _______ - meaning both positive and negative values can be stored in them
assignment
String (String str)
static int parseInt (String str)
signed
39. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
variable
String substring (int offset - int endIndex)
scope
self-governing
40. Returns the next input token as the indicated type.
byte nextByte( )
data values
tokens
parameter list
41. All wrapper classes are defined in ___________
method
java.lang package
parameter
null
42. Expressed in a Java program with single quotes
java.lang package
literal
instance data
character literal
43. A method that returns a value must have a _________
Scanner scan=new Scanner (System.in);
return statement
reference
reserved word void
44. Before you use a variable __________it
method invocation
initialize
Understanding
expression
45. They clarify the role a certain number has in the program.
string literal
boolean value
character literal
constants
46. 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.
Scanner class
actual parameters
encapsulation
visibility modifiers
47. A name for a location in memory used to hold a data value.
int compareTo (String str)
variable
conditionals
java.lang package
48. Widening byte: _________ - to int - to long - to float - to double
double
primitive variables
byte to short
arithmetic
49. After an object has been instantiated - we set the _________ to access its methods
formal parameters
self-governing
RH
dot operator
50. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
string name;
header of a method
floating point numbers