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. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
Scanner scan=new Scanner (System.in);
encapsulation of an object
character string
String concat (String str)
2. Count++; count--
data values
postfix form
arithmetic
parameter
3. 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.
String findInLine (String pattern)
char charAt (int index)
parentheses
enumerated type
4. The classes of the Java standard class library are grouped into __________.
packages
double
parameter list
instance data
5. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
string literal
java.util class libary
the DecimalFormat class
floating point numbers
6. Constructors do not even _______; therefore they cannot return a value.
java.lang package
have void
string literal
method
7. Represents either a primitive value or an object
int compareTo (String str)
String concat (String str)
variable name
boolean value
8. Returns a new string consisting of this string concatenated with str.
String concat (String str)
boolean equalsIgnoreCase (String str)
mutator method
Scanner class
9. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
encapsulation
String concat (String str)
java.lang package
support methods
10. 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
static
aliases
variable declaration
java.lang package
11. We use an object when we have a _________ to it
accessor method
assignment statement
header of a method
reference
12. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.
boolean equalsIgnoreCase (String str)
pointer
declared
encapsulation
13. The one that is invoked
accessor method
self-governing
called method
boolean equals (String str)
14. A ________________ is immutable.
string name;
String object
casting
parameter
15. 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
parameter
boolean value
char charAt (int index)
public
16. 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
a constructor
postfix form
underscores
boolean equalsIgnoreCase (String str)
17. An object has behaviors - which are defined by the ________ associated with that object.
reserved word void
boolean equalsIgnoreCase (String str)
boolean hasNext( )
operations
18. 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 -
int compareTo (String str)
service methods
num=Integer.parseInt(str);
class
19. Instance data should be defined with what________ visibility
private
Random ( )
expression
variable
20. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
prefix form
String concat (String str)
escape sequences
accessor method
21. 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
header of a method
initialize
wrapper class
tokens
22. White space characters such as space characters - tabs - and new lines that separate the elements of input
constants
delimiters
java.util class libary
Scanner useDelimiter(String pattern)
23. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
String substring (int offset - int endIndex)
state of an object
not possible
declared
24. Expressed in a Java program with single quotes
static
postfix form
variable declaration
character literal
25. A name for a location in memory used to hold a data value.
parameter
polymorphism
variable
String format (double number)
26. Widening byte: _________ - to int - to long - to float - to double
String (String str)
byte nextByte( )
byte to short
conditional statement
27. ++count; -- count
prefix form
set
System.out.println
String substring (int offset - int endIndex)
28. 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
String next( )
not possible
parameter list
method
29. 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.
parameter list
pointer
instance variable
visibility modifiers
30. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
self-governing
parameter
int compareTo (String str)
inheritance
31. Sets the scanner's delimiting pattern.
constructors
Scanner useDelimiter(String pattern)
postfix form
private
32. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
String (String str)
parentheses
encapsulation
service methods
33. The names of the parameters in the header of the method declaration
formal parameters
RH
autoboxing
expression
34. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String findInLine (String pattern)
boolean value
variable declaration
String toUpperCase ( )
35. 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
instantiation
System.out.println
character literal
Understanding
36. Attempts to find the next occurence of the specified pattern - ignoring delimiters
character string
string literal
String findInLine (String pattern)
method invocation
37. Constructor: creates a new string object with the same characters as str.
assignment
String (String str)
variable
reference
38. 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
Scanner class
parameter
string literal
dot operator
39. The act of creating an object using the "new" operator
Understanding
inheritance
String nextLine( )
instantiation
40. 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.
String object
initialize
assignment conversion
autoboxing
41. Begins with a backslash character ""
not possible
escape sequences
class level
string name;
42. Modifier>type/void>identifier>parameters>method body
not possible
method declaration
Scanner useDelimiter(String pattern)
local data
43. The values passed into a method in an invocation; these are called the arguments to the method
scope
boolean nextBoolean( )
reserved word void
actual parameters
44. Returns a new string consisting of this string concatenated with str.
byte to short
boolean equals (String str)
num=Integer.parseInt(str);
static int parseInt (String str)
45. After an object has been instantiated - we set the _________ to access its methods
expression
dot operator
null
literal
46. 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
service methods
polymorphism
aliases
pointer
47. The order in which statements are executed in a running program
flow of control
num=Integer.parseInt(str);
encapsulation
arithmetic
48. 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.
instantiation
variable
expression
parameter list
49. Returns the int corresponding to the value stored in the specified string
autoboxing
static int parseInt (String str)
null
long
50. A method that returns a value must have a _________
assignment
class library
return statement
conditionals