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. sides=10;
set
assignment statement
parentheses
dot operator
2. 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.
variable name
assignment conversion
class
flow of control
3. Boolean type conversions are ___________
constructors
not possible
Understanding
variable name
4. Returns a new string consisting of this string concatenated with str.
String concat (String str)
actual parameters
signed
byte nextByte( )
5. We use an object when we have a _________ to it
reference
char charAt (int index)
postfix form
parentheses
6. Delimited by double quotation characters
String substring (int offset - int endIndex)
String format (double number)
string literal
reference
7. 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.
behaviors of an object
variable declaration
parameter list
signed
8. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
prefix form
instance data
parentheses
string literal
9. Attempts to find the next occurence of the specified pattern - ignoring delimiters
Understanding
Random class
String findInLine (String pattern)
assignment conversion
10. 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);
encapsulation
local data
actual parameters
11. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
casting
floating point numbers
state of an object
Random ( )
12. Two floating data types: float - _______
method declaration
String nextLine( )
double
RH
13. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
escape sequences
constants
String toUpperCase ( )
boolean equalsIgnoreCase (String str)
14. The classes of the Java standard class library are grouped into __________.
not possible
expression
packages
visibility modifiers
15. 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
tokens
state of an object
a constructor
method
16. Count++; count--
postfix form
String (String str)
class
behaviors of an object
17. Constructors do not even _______; therefore they cannot return a value.
have void
conditional statement
String toUpperCase ( )
class library
18. They clarify the role a certain number has in the program.
class level
casting
assignment
constants
19. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
public
java.lang package
NumberFormat class
packages
20. White space characters such as space characters - tabs - and new lines that separate the elements of input
parameter list
delimiters
service methods
mutator method
21. 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
boolean equalsIgnoreCase (String str)
static int parseInt (String str)
floating point numbers
casting
22. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
attributes of an object
declared
signed
23. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
pointer
String substring (int offset - int endIndex)
visibility modifiers
expression
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
NumberFormat class
method declaration
string name;
autoboxing
25. 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
instance variable
header of a method
conditionals
Understanding
26. Three ways in which Java conversions occur: _________ conversion - promotion - casting
reference
boolean value
num=Integer.parseInt(str);
assignment
27. All wrapper classes are defined in ___________
scope
packages
java.lang package
import java.util*
28. Represents either a primitive value or an object
constructors
attributes of an object
variable name
String toLowerCase ( )
29. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
NumberFormat class
assignment statement
class level
30. The act of creating an object using the "new" operator
self-governing
instantiation
underscores
initialize
31. 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
method
String findInLine (String pattern)
initialize
long
32. Methods in the Math class are ______
method declaration
static
header of a method
the DecimalFormat class
33. 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
String replace (char oldChar - char newChar)
aliases
String format (double number)
Scanner class
34. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
byte to short
instance variable
assignment conversion
boolean equals (String str)
35. Expressed in a Java program with single quotes
polymorphism
floating point numbers
class library
character literal
36. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
support methods
encapsulation of an object
long
method
37. Returns the number of characters in this stirng.
underscores
the "import" declaration
int length( )
String nextLine( )
38. The values passed into a method in an invocation; these are called the arguments to the method
String nextLine( )
static int parseInt (String str)
actual parameters
reserved word void
39. Every object has two things: a state and a _____ of behaviors
NumberFormat class
escape sequences
polymorphism
set
40. Four integer data types: byte - short - int - _____
tokens
return statement
boolean equalsIgnoreCase (String str)
long
41. A null reference indicates that a variable does not refer to an object
Scanner useDelimiter(String pattern)
null
String format (double number)
int compareTo (String str)
42. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
underscores
literal
boolean value
43. 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.
packages
mutator method
scope
polymorphism
44. 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
long
String concat (String str)
wrapper class
instantiation
45. ______________ operators have higher precedence
String concat (String str)
arithmetic
instance data
Random ( )
46. Begins with a backslash character ""
escape sequences
double
wrapper class
public
47. After an object has been instantiated - we set the _________ to access its methods
dot operator
java.lang package
constructors
byte to short
48. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
parameter
variable declaration
String toLowerCase ( )
import java.util*
49. A method that returns a value must have a _________
class library
scope
return statement
variable name
50. ++count; -- count
encapsulation of an object
uninitialized variables
Random ( )
prefix form