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 a new string consisting of this string concatenated with str.
reference
String concat (String str)
set
parameter
2. The order in which statements are executed in a running program
flow of control
method
String toLowerCase ( )
mutator method
3. ______________ operators have higher precedence
called method
arithmetic
boolean value
private
4. Declared in a class but not inside any particular method
boolean equals (String str)
header of a method
encapsulation
instance data
5. 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
private
class library
scope
6. Returns the number of characters in this stirng.
int length( )
boolean equals (String str)
self-governing
service methods
7. Returns the int corresponding to the value stored in the specified string
NumberFormat class
assignment statement
uninitialized variables
static int parseInt (String str)
8. A ________________ is immutable.
Understanding
String object
visibility modifiers
Scanner useDelimiter(String pattern)
9. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
encapsulation of an object
header of a method
local data
variable declaration
10. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
long
String toUpperCase ( )
wrapper class
String replace (char oldChar - char newChar)
11. Constructor: creates a new string object with the same characters as str.
assignment conversion
initialize
String (String str)
tokens
12. Modifier>type/void>identifier>parameters>method body
promotion
method declaration
actual parameters
called method
13. Boolean type conversions are ___________
a constructor
not possible
Random class
prefix form
14. Variables and constants can be referenced in any method of the class by declaring at the _________
class level
character string
variable
static int parseInt (String str)
15. Two floating data types: float - _______
constants
double
accessor method
String nextLine( )
16. Widening byte: _________ - to int - to long - to float - to double
static int parseInt (String str)
byte to short
character string
return statement
17. White space characters such as space characters - tabs - and new lines that separate the elements of input
private
called method
formal parameters
delimiters
18. A value that is passed into a method when it is invoked
parameter
accessor method
string name;
static int parseInt (String str)
19. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
aliases
behaviors of an object
instance data
int compareTo (String str)
20. A method that returns a value must have a _________
actual parameters
instantiation
return statement
java.util class libary
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
casting
expression
uninitialized variables
packages
22. Delimited by double quotation characters
string literal
constructors
String toLowerCase ( )
inheritance
23. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
String object
java.lang package
int compareTo (String str)
parameter
24. 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:
java.lang package
num=Integer.parseInt(str);
casting
constructors
25. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
higher
String findInLine (String pattern)
not possible
26. 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
have void
the DecimalFormat class
method
char charAt (int index)
27. An object in Java - defined by the class String
character string
private
String concat (String str)
return statement
28. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
declared
header of a method
parentheses
29. Before you use a variable __________it
signed
header of a method
initialize
instance data
30. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
enumerated type
variable name
String concat (String str)
String toLowerCase ( )
31. Cast operator has _________ precedence to division
higher
boolean equals (String str)
parentheses
conditional statement
32. Variables that don't contain any data
inheritance
operations
RH
uninitialized variables
33. 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
String replace (char oldChar - char newChar)
System.out.println
byte nextByte( )
actual parameters
34. Three ways in which Java conversions occur: _________ conversion - promotion - casting
operations
int compareTo (String str)
Random ( )
assignment
35. 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 -
class
parentheses
operations
String format (double number)
36. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
conditionals
parameter
header of a method
37. An object has behaviors - which are defined by the ________ associated with that object.
operations
java.util class libary
reserved word void
set
38. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
String toLowerCase ( )
variable declaration
state of an object
java.lang package
39. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
method invocation
boolean equalsIgnoreCase (String str)
String concat (String str)
import java.util*
40. 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
String toUpperCase ( )
attributes of an object
null
a constructor
41. 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.
support methods
reserved word void
the "import" declaration
boolean equals (String str)
42. Returns the character at the specified index.
Random ( )
char charAt (int index)
java.lang package
import java.util*
43. The names of the parameters in the header of the method declaration
operations
formal parameters
the "import" declaration
Random ( )
44. 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.
import java.util*
polymorphism
System.out.println
mutator method
45. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
boolean value
self-governing
polymorphism
Scanner scan=new Scanner (System.in);
46. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
data values
uninitialized variables
string literal
47. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
attributes of an object
polymorphism
return statement
48. The declarations of object variables have a similar structure to the declaration of _______________
String nextLine( )
primitive variables
operations
postfix form
49. 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)
String format (double number)
state of an object
prefix form
50. _____ expression evaluated first
method
pointer
RH
visibility modifiers