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. Count++; count--
String toUpperCase ( )
postfix form
byte to short
boolean equalsIgnoreCase (String str)
2. 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
service methods
variable
inheritance
pointer
3. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String format (double number)
String substring (int offset - int endIndex)
higher
service methods
4. They clarify the role a certain number has in the program.
encapsulation
num=Integer.parseInt(str);
constants
parameter
5. A value that is passed into a method when it is invoked
formal parameters
assignment
parameter
local data
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.
method invocation
character string
encapsulation
primitive variables
7. Boolean type conversions are ___________
autoboxing
not possible
Understanding
char charAt (int index)
8. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
assignment conversion
boolean nextBoolean( )
parentheses
enumerated type
9. The automatic conversion between a primitive value and a corresponding wrapper object.
character string
parameter list
declared
autoboxing
10. Before you use a variable __________it
variable name
operations
initialize
parameter list
11. Part of the java.util class; picks a number at random out of a range of values.
class
Random class
instance data
assignment statement
12. 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
String findInLine (String pattern)
casting
parentheses
service methods
13. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
signed
boolean equals (String str)
header of a method
boolean value
14. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
signed
behaviors of an object
parameter
floating point numbers
15. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
floating point numbers
encapsulation
data values
accessor method
16. A null reference indicates that a variable does not refer to an object
have void
string literal
String replace (char oldChar - char newChar)
null
17. Expressed in a Java program with single quotes
method invocation
character literal
variable declaration
a constructor
18. Represents either a primitive value or an object
higher
self-governing
accessor method
variable name
19. Returns a new string consisting of this string concatenated with str.
formal parameters
character literal
boolean equals (String str)
int compareTo (String str)
20. A method that returns a value must have a _________
return statement
literal
variable name
boolean equals (String str)
21. The names of the parameters in the header of the method declaration
arithmetic
enumerated type
formal parameters
instantiation
22. Returns the next input token as the indicated type.
dot operator
char charAt (int index)
byte nextByte( )
accessor method
23. Cast operator has _________ precedence to division
String nextLine( )
higher
boolean value
scope
24. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
pointer
instance data
flow of control
25. A class usually provides services to access and modify __________
data values
local data
double
escape sequences
26. An explicit data value used in a program
literal
initialize
packages
mutator method
27. sides=10;
inheritance
method invocation
assignment statement
Scanner scan=new Scanner (System.in);
28. 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.
String format (double number)
RH
parameter list
int compareTo (String str)
29. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
higher
conditionals
floating point numbers
polymorphism
30. The one that is invoked
local data
string literal
called method
promotion
31. Constructors do not even _______; therefore they cannot return a value.
String nextLine( )
attributes of an object
initialize
have void
32. Also called a selection statement b/c it allows us to choose which statement will be executed next.
return statement
conditional statement
parameter
inheritance
33. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
pointer
boolean equalsIgnoreCase (String str)
casting
support methods
34. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
postfix form
self-governing
accessor method
35. Constants are ______ because the can't be changed once you use the final modifier
underscores
the DecimalFormat class
parameter list
public
36. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
casting
prefix form
int compareTo (String str)
not possible
37. All wrapper classes are defined in ___________
java.lang package
higher
parameter
Random ( )
38. Begins with a backslash character ""
behaviors of an object
method
escape sequences
long
39. The order in which statements are executed in a running program
reference
flow of control
assignment conversion
variable
40. An object in Java - defined by the class String
accessor method
return statement
character string
String format (double number)
41. An object has behaviors - which are defined by the ________ associated with that object.
encapsulation of an object
a constructor
operations
data values
42. The Scanner class is part of ___________________
declared
byte to short
scope
java.util class libary
43. 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.
boolean value
static int parseInt (String str)
visibility modifiers
instance data
44. Delimited by double quotation characters
uninitialized variables
java.lang package
String object
string literal
45. Variables that don't contain any data
method declaration
variable name
uninitialized variables
higher
46. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
class level
packages
byte to short
constructors
47. Returns the character at the specified index.
String toUpperCase ( )
called method
char charAt (int index)
accessor method
48. Returns the next input token as a character string.
String next( )
java.util class libary
class level
pointer
49. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
java.lang package
num=Integer.parseInt(str);
parentheses
promotion
50. 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
parentheses
attributes of an object
public
formal parameters