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. All wrapper classes are defined in ___________
java.lang package
static
service methods
support methods
2. 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.
escape sequences
formal parameters
parameter list
int compareTo (String str)
3. 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
constructors
static
formal parameters
casting
4. Constructors do not even _______; therefore they cannot return a value.
Scanner scan=new Scanner (System.in);
have void
method declaration
boolean nextBoolean( )
5. Variables that don't contain any data
import java.util*
uninitialized variables
escape sequences
NumberFormat class
6. Cast operator has _________ precedence to division
instance data
reserved word void
higher
accessor method
7. Count++; count--
attributes of an object
postfix form
class library
Random ( )
8. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
self-governing
support methods
escape sequences
9. All numeric types are _______ - meaning both positive and negative values can be stored in them
casting
String findInLine (String pattern)
signed
local data
10. 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)
string name;
header of a method
String toUpperCase ( )
11. The automatic conversion between a primitive value and a corresponding wrapper object.
RH
byte to short
boolean equals (String str)
autoboxing
12. Also called a selection statement b/c it allows us to choose which statement will be executed next.
double
uninitialized variables
conditional statement
autoboxing
13. A method that returns a value must have a _________
boolean hasNext( )
return statement
called method
support methods
14. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
import java.util*
parentheses
higher
uninitialized variables
15. Expressed in a Java program with single quotes
declared
underscores
character literal
String findInLine (String pattern)
16. 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
polymorphism
arithmetic
variable declaration
class
17. They clarify the role a certain number has in the program.
constants
parentheses
polymorphism
int length( )
18. The act of creating an object using the "new" operator
parameter
instantiation
char charAt (int index)
parameter list
19. 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.
not possible
autoboxing
visibility modifiers
assignment
20. 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
autoboxing
class
wrapper class
method
21. Part of the java.util class; picks a number at random out of a range of values.
Random class
mutator method
not possible
byte to short
22. 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
service methods
attributes of an object
behaviors of an object
23. Changes a particular value - e.g.setX - where X is the value they are setting.
encapsulation
boolean nextBoolean( )
mutator method
tokens
24. Every object has two things: a state and a _____ of behaviors
num=Integer.parseInt(str);
set
boolean equals (String str)
support methods
25. format for constants: all upper-case; separated by ________
string literal
accessor method
underscores
static
26. 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
instance data
dot operator
attributes of an object
parameter list
27. Represents either a primitive value or an object
variable name
instance variable
flow of control
support methods
28. Part of the standard Java class library - provides convenient methods for reading input values of various types. the input can come from various sources - including data typed interactively by the user or data stored in a file; the Scanner class can
the DecimalFormat class
variable declaration
Scanner class
reserved word void
29. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
method invocation
dot operator
formal parameters
state of an object
30. An object has behaviors - which are defined by the ________ associated with that object.
class library
boolean value
class level
operations
31. Only two valid values: true and false; can indicate whether a particular condition is true - but can also be used to represent any situation that has two states - such as a light bulb being on or off
boolean value
formal parameters
Random ( )
floating point numbers
32. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance data
Scanner useDelimiter(String pattern)
instance variable
declared
33. Returns the next input token as the indicated type.
boolean nextBoolean( )
String format (double number)
initialize
String (String str)
34. New memory space is reserved for that variable every time an instance of the class that is created.
state of an object
instance data
constants
NumberFormat class
35. Returns a new string consisting of this string concatenated with str.
assignment statement
boolean equals (String str)
string literal
inheritance
36. 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
char charAt (int index)
int length( )
initialize
System.out.println
37. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
not possible
self-governing
enumerated type
uninitialized variables
38. The order in which statements are executed in a running program
instantiation
boolean equals (String str)
String findInLine (String pattern)
flow of control
39. 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
reserved word void
string name;
Scanner class
autoboxing
40. 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 -
static
support methods
class
String nextLine( )
41. Returns the next input token as the indicated type.
static
byte nextByte( )
data values
parameter list
42. Returns all input remaining on the current line as a character string.
accessor method
parameter
String nextLine( )
polymorphism
43. Returns the number of characters in this stirng.
signed
int length( )
String toLowerCase ( )
Scanner scan=new Scanner (System.in);
44. Two floating data types: float - _______
Understanding
double
instance variable
the DecimalFormat class
45. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
behaviors of an object
escape sequences
String toLowerCase ( )
string name;
46. ______________ operators have higher precedence
arithmetic
instance data
boolean nextBoolean( )
parameter list
47. Variables and constants can be referenced in any method of the class by declaring at the _________
inheritance
method
boolean value
class level
48. A set of classes that supports the development of programs
wrapper class
class library
underscores
promotion
49. Methods in the Math class are ______
assignment conversion
variable
static
the DecimalFormat class
50. When a variable is declared inside a method
local data
class library
static int parseInt (String str)
promotion