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. Modifier>type/void>identifier>parameters>method body
String toLowerCase ( )
Random class
support methods
method declaration
2. Elements of input
import java.util*
tokens
character literal
the DecimalFormat class
3. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String substring (int offset - int endIndex)
declared
String replace (char oldChar - char newChar)
RH
4. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
parameter
service methods
java.lang package
local data
5. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
pointer
encapsulation
visibility modifiers
6. 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
assignment statement
character string
conditional statement
a constructor
7. They clarify the role a certain number has in the program.
boolean equalsIgnoreCase (String str)
constants
private
a constructor
8. The names of the parameters in the header of the method declaration
encapsulation of an object
formal parameters
java.lang package
instance data
9. 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
Scanner useDelimiter(String pattern)
promotion
wrapper class
return statement
10. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
NumberFormat class
constructors
parentheses
scope
11. We use an object when we have a _________ to it
reference
operations
null
parameter
12. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
class library
class
assignment statement
behaviors of an object
13. A name for a location in memory used to hold a data value.
pointer
variable
boolean nextBoolean( )
constants
14. Three ways in which Java conversions occur: _________ conversion - promotion - casting
service methods
have void
the DecimalFormat class
assignment
15. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
java.lang package
String replace (char oldChar - char newChar)
data values
set
16. 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
private
double
pointer
17. 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
variable name
boolean hasNext( )
expression
NumberFormat class
18. 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
string name;
String toLowerCase ( )
method declaration
mutator method
19. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
arithmetic
String findInLine (String pattern)
called method
floating point numbers
20. The declarations of object variables have a similar structure to the declaration of _______________
dot operator
visibility modifiers
String object
primitive variables
21. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.
enumerated type
Random ( )
boolean nextBoolean( )
assignment conversion
22. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
the "import" declaration
variable
num=Integer.parseInt(str);
inheritance
23. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
String next( )
a constructor
int compareTo (String str)
java.lang package
24. Returns a new string consisting of this string concatenated with str.
String concat (String str)
long
conditional statement
Understanding
25. 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 next( )
behaviors of an object
String replace (char oldChar - char newChar)
26. A variable that refers to an object must be __________
instance data
promotion
declared
method
27. Begins with a backslash character ""
escape sequences
prefix form
behaviors of an object
character string
28. White space characters such as space characters - tabs - and new lines that separate the elements of input
private
NumberFormat class
delimiters
casting
29. Variables that don't contain any data
the "import" declaration
not possible
return statement
uninitialized variables
30. A set of classes that supports the development of programs
class library
instantiation
mutator method
long
31. An object has behaviors - which are defined by the ________ associated with that object.
String nextLine( )
operations
tokens
self-governing
32. An object in Java - defined by the class String
character string
attributes of an object
parentheses
operations
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 concat (String str)
public
instance variable
aliases
34. Returns the next input token as the indicated type.
string literal
byte nextByte( )
packages
RH
35. Delimited by double quotation characters
class library
String format (double number)
string literal
variable
36. Part of the java.util class; picks a number at random out of a range of values.
constructors
boolean nextBoolean( )
Random class
Scanner class
37. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
method
underscores
String toLowerCase ( )
38. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
null
byte nextByte( )
Scanner scan=new Scanner (System.in);
39. 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.
polymorphism
boolean value
wrapper class
String concat (String str)
40. Two floating data types: float - _______
Scanner class
double
boolean value
assignment conversion
41. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
escape sequences
import java.util*
int compareTo (String str)
java.util class libary
42. Constructor: creates a new string object with the same characters as str.
reference
int length( )
String (String str)
instantiation
43. 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
called method
Understanding
character string
return statement
44. The act of creating an object using the "new" operator
signed
assignment statement
instantiation
Scanner useDelimiter(String pattern)
45. Four integer data types: byte - short - int - _____
class library
java.util class libary
static int parseInt (String str)
long
46. Constructors do not even _______; therefore they cannot return a value.
wrapper class
have void
String (String str)
constants
47. Two categories of statements that control the flow of executing through a method: __________ and loops
attributes of an object
have void
instance data
conditionals
48. Returns all input remaining on the current line as a character string.
boolean nextBoolean( )
java.util class libary
signed
String nextLine( )
49. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
conditional statement
parentheses
boolean equalsIgnoreCase (String str)
boolean nextBoolean( )
50. A method that returns a value must have a _________
operations
String (String str)
delimiters
return statement