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. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
self-governing
visibility modifiers
header of a method
int length( )
2. Four integer data types: byte - short - int - _____
String format (double number)
expression
behaviors of an object
long
3. Before you use a variable __________it
promotion
inheritance
data values
initialize
4. Returns the character at the specified index.
char charAt (int index)
header of a method
variable name
autoboxing
5. 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
tokens
aliases
instance data
expression
6. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
attributes of an object
parameter
Understanding
accessor method
7. A name for a location in memory used to hold a data value.
variable
int length( )
String findInLine (String pattern)
the DecimalFormat class
8. Modifier>type/void>identifier>parameters>method body
public
underscores
method declaration
prefix form
9. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
tokens
Random ( )
variable declaration
NumberFormat class
10. Returns a new string consisting of this string concatenated with str.
byte nextByte( )
prefix form
String concat (String str)
floating point numbers
11. A value that is passed into a method when it is invoked
parameter
String (String str)
operations
variable declaration
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
casting
set
state of an object
conditionals
13. A variable that refers to an object must be __________
self-governing
declared
constructors
set
14. 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
prefix form
escape sequences
dot operator
System.out.println
15. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
operations
parameter
instance variable
signed
16. 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
pointer
expression
the DecimalFormat class
scope
17. They clarify the role a certain number has in the program.
Scanner useDelimiter(String pattern)
instance data
String next( )
constants
18. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
character literal
byte nextByte( )
String (String str)
support methods
19. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String (String str)
String substring (int offset - int endIndex)
expression
wrapper class
20. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
System.out.println
java.util class libary
boolean hasNext( )
floating point numbers
21. 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
expression
static int parseInt (String str)
String nextLine( )
string name;
22. Two floating data types: float - _______
double
long
int length( )
higher
23. The Scanner class is part of ___________________
assignment
method
java.util class libary
parameter
24. 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
enumerated type
a constructor
class level
inheritance
25. We use an object when we have a _________ to it
behaviors of an object
declared
reference
Random ( )
26. The one that is invoked
called method
long
state of an object
conditionals
27. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
behaviors of an object
constructors
parameter list
num=Integer.parseInt(str);
28. Widening byte: _________ - to int - to long - to float - to double
String concat (String str)
byte to short
operations
a constructor
29. 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
local data
autoboxing
delimiters
encapsulation of an object
30. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
enumerated type
state of an object
promotion
String concat (String str)
31. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
instance data
initialize
encapsulation
32. 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
Random ( )
variable declaration
conditionals
instantiation
33. Methods in the Math class are ______
private
autoboxing
the "import" declaration
static
34. A ________________ is immutable.
the "import" declaration
dot operator
prefix form
String object
35. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
encapsulation of an object
declared
mutator method
36. Begins with a backslash character ""
escape sequences
class level
postfix form
data values
37. Returns a string containing the specified number formatted according to this object's pattern.
signed
String format (double number)
int compareTo (String str)
private
38. Constructors do not even _______; therefore they cannot return a value.
conditionals
promotion
have void
parameter
39. All wrapper classes are defined in ___________
escape sequences
static int parseInt (String str)
java.lang package
the "import" declaration
40. A null reference indicates that a variable does not refer to an object
set
null
long
variable declaration
41. The order in which statements are executed in a running program
character string
primitive variables
initialize
flow of control
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.
expression
parameter list
primitive variables
dot operator
43. Variables and constants can be referenced in any method of the class by declaring at the _________
character literal
escape sequences
reserved word void
class level
44. After an object has been instantiated - we set the _________ to access its methods
instance variable
postfix form
dot operator
static
45. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.
reserved word void
mutator method
String toLowerCase ( )
not possible
46. Returns all input remaining on the current line as a character string.
not possible
instance variable
String nextLine( )
variable declaration
47. sides=10;
actual parameters
accessor method
floating point numbers
assignment statement
48. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
polymorphism
the "import" declaration
pointer
aliases
49. Part of the java.util class; picks a number at random out of a range of values.
prefix form
expression
static
Random class
50. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
long
assignment statement
num=Integer.parseInt(str);