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. Returns the character at the specified index.
operations
char charAt (int index)
signed
String object
2. They clarify the role a certain number has in the program.
assignment statement
constants
aliases
scope
3. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
escape sequences
Random ( )
enumerated type
4. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.
long
self-governing
null
polymorphism
5. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
instance variable
mutator method
delimiters
6. Count++; count--
constants
string name;
String replace (char oldChar - char newChar)
postfix form
7. 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.
instantiation
declared
encapsulation
floating point numbers
8. Returns all input remaining on the current line as a character string.
polymorphism
Scanner scan=new Scanner (System.in);
public
String nextLine( )
9. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
boolean value
service methods
scope
not possible
10. 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.
pointer
method invocation
prefix form
visibility modifiers
11. Part of the java.util class; picks a number at random out of a range of values.
Random class
postfix form
actual parameters
instance data
12. Begins with a backslash character ""
the DecimalFormat class
escape sequences
NumberFormat class
byte to short
13. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
literal
uninitialized variables
reserved word void
14. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
Understanding
null
instance variable
15. White space characters such as space characters - tabs - and new lines that separate the elements of input
byte to short
underscores
delimiters
RH
16. Delimited by double quotation characters
java.util class libary
string literal
service methods
visibility modifiers
17. 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
static int parseInt (String str)
class
data values
18. A method that returns a value must have a _________
attributes of an object
return statement
inheritance
operations
19. If the string object str holds the string "987" - the following line of code converts the string into the integer variable 987 and stores that value in the int variable num:
num=Integer.parseInt(str);
inheritance
assignment conversion
accessor method
20. Declared in a class but not inside any particular method
class
instance data
mutator method
instance variable
21. Also called a selection statement b/c it allows us to choose which statement will be executed next.
reserved word void
conditional statement
string name;
service methods
22. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
String concat (String str)
import java.util*
literal
set
23. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
char charAt (int index)
boolean nextBoolean( )
header of a method
24. Constructor: creates a new pseudorandom number generator.
Random ( )
method invocation
boolean nextBoolean( )
java.lang package
25. ____________ is instantiated in the traditional way using the new operator.
String format (double number)
NumberFormat class
the DecimalFormat class
visibility modifiers
26. 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
instantiation
prefix form
pointer
boolean nextBoolean( )
27. This declaration creates a Scanner object that reads input from the keyboard
scope
Scanner scan=new Scanner (System.in);
String object
primitive variables
28. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
promotion
String toUpperCase ( )
class
encapsulation
29. Returns the number of characters in this stirng.
inheritance
int length( )
String concat (String str)
assignment statement
30. Variables and constants can be referenced in any method of the class by declaring at the _________
local data
String (String str)
class level
boolean equals (String str)
31. Returns a new string consisting of this string concatenated with str.
String concat (String str)
String nextLine( )
tokens
accessor method
32. Instance data should be defined with what________ visibility
char charAt (int index)
private
Scanner useDelimiter(String pattern)
parameter list
33. Widening byte: _________ - to int - to long - to float - to double
boolean value
byte to short
char charAt (int index)
expression
34. Returns the next input token as the indicated type.
declared
Random class
instance variable
byte nextByte( )
35. Sets the scanner's delimiting pattern.
declared
assignment conversion
packages
Scanner useDelimiter(String pattern)
36. Expressed in a Java program with single quotes
character literal
String format (double number)
method invocation
return statement
37. 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
System.out.println
String concat (String str)
declared
assignment
38. 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
method invocation
RH
the DecimalFormat class
uninitialized variables
39. New memory space is reserved for that variable every time an instance of the class that is created.
attributes of an object
instance data
formal parameters
long
40. 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
service methods
String toLowerCase ( )
byte nextByte( )
41. An explicit data value used in a program
literal
not possible
conditionals
private
42. 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.
parameter list
boolean hasNext( )
boolean equals (String str)
prefix form
43. A null reference indicates that a variable does not refer to an object
String findInLine (String pattern)
parameter
null
polymorphism
44. Three ways in which Java conversions occur: _________ conversion - promotion - casting
variable
assignment
set
return statement
45. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
constructors
tokens
behaviors of an object
parameter
46. After an object has been instantiated - we set the _________ to access its methods
support methods
byte nextByte( )
tokens
dot operator
47. The names of the parameters in the header of the method declaration
String nextLine( )
formal parameters
encapsulation
tokens
48. Returns a string containing the specified number formatted according to this object's pattern.
java.lang package
accessor method
instance data
String format (double number)
49. Constructor: creates a new string object with the same characters as str.
assignment statement
String (String str)
expression
String object
50. 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
delimiters
boolean value
expression
data values