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 true if this string contains the same characters as str (without regard to case) and false otherwise.
String toUpperCase ( )
boolean equalsIgnoreCase (String str)
encapsulation
class
2. An explicit data value used in a program
declared
String concat (String str)
String findInLine (String pattern)
literal
3. Cast operator has _________ precedence to division
String toUpperCase ( )
higher
Scanner scan=new Scanner (System.in);
instance data
4. ++count; -- count
variable
prefix form
the "import" declaration
delimiters
5. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
the "import" declaration
self-governing
boolean hasNext( )
variable declaration
6. The automatic conversion between a primitive value and a corresponding wrapper object.
declared
autoboxing
variable name
primitive variables
7. 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.
casting
byte nextByte( )
Scanner scan=new Scanner (System.in);
visibility modifiers
8. Sets the scanner's delimiting pattern.
service methods
have void
import java.util*
Scanner useDelimiter(String pattern)
9. Returns a new string consisting of this string concatenated with str.
NumberFormat class
char charAt (int index)
aliases
String concat (String str)
10. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
variable
private
String next( )
11. A class usually provides services to access and modify __________
pointer
String (String str)
data values
visibility modifiers
12. The declarations of object variables have a similar structure to the declaration of _______________
header of a method
instantiation
byte nextByte( )
primitive variables
13. sides=10;
byte nextByte( )
prefix form
assignment statement
int compareTo (String str)
14. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
parentheses
NumberFormat class
method declaration
15. 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
delimiters
flow of control
expression
String findInLine (String pattern)
16. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
parameter
uninitialized variables
behaviors of an object
character string
17. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
have void
floating point numbers
String findInLine (String pattern)
String toUpperCase ( )
18. Before you use a variable __________it
Scanner class
initialize
variable declaration
behaviors of an object
19. Three ways in which Java conversions occur: _________ conversion - promotion - casting
String toUpperCase ( )
Random class
prefix form
assignment
20. 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
actual parameters
int length( )
Understanding
the "import" declaration
21. The Scanner class is part of ___________________
class
java.util class libary
mutator method
floating point numbers
22. Begins with a backslash character ""
escape sequences
String replace (char oldChar - char newChar)
long
method
23. They clarify the role a certain number has in the program.
accessor method
instance data
constants
assignment statement
24. Changes a particular value - e.g.setX - where X is the value they are setting.
behaviors of an object
System.out.println
expression
mutator method
25. An object in Java - defined by the class String
character string
escape sequences
postfix form
instance data
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
method
behaviors of an object
double
String concat (String str)
27. Elements of input
delimiters
primitive variables
tokens
public
28. 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
public
the DecimalFormat class
System.out.println
assignment conversion
29. We use an object when we have a _________ to it
mutator method
String replace (char oldChar - char newChar)
reference
aliases
30. 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.
import java.util*
char charAt (int index)
enumerated type
higher
31. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
the DecimalFormat class
String toLowerCase ( )
double
String next( )
32. 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
boolean equals (String str)
formal parameters
string name;
33. Every object has two things: a state and a _____ of behaviors
set
constants
header of a method
encapsulation of an object
34. Constructor: creates a new string object with the same characters as str.
String object
String (String str)
String next( )
accessor method
35. Returns the next input token as the indicated type.
primitive variables
not possible
Random class
byte nextByte( )
36. Attempts to find the next occurence of the specified pattern - ignoring delimiters
dot operator
boolean equalsIgnoreCase (String str)
called method
String findInLine (String pattern)
37. 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
inheritance
variable declaration
a constructor
prefix form
38. The values passed into a method in an invocation; these are called the arguments to the method
floating point numbers
accessor method
actual parameters
self-governing
39. 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
conditionals
mutator method
called method
attributes of an object
40. ______________ operators have higher precedence
arithmetic
class level
underscores
boolean hasNext( )
41. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
NumberFormat class
floating point numbers
the "import" declaration
a constructor
42. This declaration creates a Scanner object that reads input from the keyboard
class level
Scanner scan=new Scanner (System.in);
reserved word void
constructors
43. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used
constructors
declared
method invocation
inheritance
44. 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 concat (String str)
aliases
promotion
45. Each piece of data that we send to a method
delimiters
parameter
byte to short
promotion
46. format for constants: all upper-case; separated by ________
self-governing
String nextLine( )
String substring (int offset - int endIndex)
underscores
47. 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:
support methods
floating point numbers
System.out.println
num=Integer.parseInt(str);
48. Returns true if the scanner has anotehr token in its input.
character literal
pointer
boolean hasNext( )
self-governing
49. Methods in the Math class are ______
static
System.out.println
java.util class libary
boolean equalsIgnoreCase (String str)
50. 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
aliases
RH
self-governing
class