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. 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 -
arithmetic
class
header of a method
dot operator
2. 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
Random class
class library
wrapper class
variable declaration
3. 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
java.util class libary
header of a method
dot operator
Scanner class
4. Changes a particular value - e.g.setX - where X is the value they are setting.
operations
mutator method
int compareTo (String str)
parameter list
5. The values passed into a method in an invocation; these are called the arguments to the method
local data
actual parameters
variable
String format (double number)
6. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
encapsulation
flow of control
java.util class libary
7. Boolean type conversions are ___________
actual parameters
System.out.println
not possible
signed
8. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
floating point numbers
the "import" declaration
String toLowerCase ( )
service methods
9. Before you use a variable __________it
instantiation
boolean nextBoolean( )
initialize
packages
10. ++count; -- count
underscores
prefix form
boolean equals (String str)
packages
11. ______________ operators have higher precedence
arithmetic
return statement
have void
autoboxing
12. An object in Java - defined by the class String
instance variable
character string
Scanner scan=new Scanner (System.in);
String substring (int offset - int endIndex)
13. The act of creating an object using the "new" operator
signed
static int parseInt (String str)
instantiation
conditionals
14. When a variable is declared inside a method
dot operator
local data
the DecimalFormat class
double
15. Part of the java.util class; picks a number at random out of a range of values.
Random class
postfix form
character literal
the DecimalFormat class
16. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
state of an object
Scanner class
autoboxing
17. 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
the DecimalFormat class
string name;
instance variable
static int parseInt (String str)
18. A ________________ is immutable.
inheritance
support methods
instance data
String object
19. A set of classes that supports the development of programs
instance variable
prefix form
boolean hasNext( )
class library
20. Every object has two things: a state and a _____ of behaviors
import java.util*
set
variable declaration
casting
21. 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
signed
literal
System.out.println
instance variable
22. Count++; count--
escape sequences
public
postfix form
parameter
23. White space characters such as space characters - tabs - and new lines that separate the elements of input
parameter
scope
the DecimalFormat class
delimiters
24. Returns the next input token as the indicated type.
support methods
wrapper class
inheritance
boolean nextBoolean( )
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
packages
RH
assignment statement
method
26. 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.
static
Random class
parameter list
java.lang package
27. 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
constants
Understanding
String next( )
parameter
28. 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
parameter
import java.util*
higher
29. 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 next( )
conditionals
enumerated type
flow of control
30. Constants are ______ because the can't be changed once you use the final modifier
underscores
String next( )
literal
public
31. Each piece of data that we send to a method
constructors
delimiters
parameter
literal
32. After an object has been instantiated - we set the _________ to access its methods
have void
assignment
int length( )
dot operator
33. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
variable name
state of an object
method invocation
not possible
34. Methods in the Math class are ______
byte to short
static
parameter list
enumerated type
35. All wrapper classes are defined in ___________
assignment conversion
called method
String nextLine( )
java.lang package
36. 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:
num=Integer.parseInt(str);
the DecimalFormat class
local data
mutator method
37. Elements of input
tokens
method declaration
character literal
static
38. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
String nextLine( )
String concat (String str)
NumberFormat class
formal parameters
39. 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
accessor method
String toLowerCase ( )
floating point numbers
inheritance
40. 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.
casting
encapsulation
character string
accessor method
41. The order in which statements are executed in a running program
flow of control
System.out.println
character string
method declaration
42. 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
character string
accessor method
attributes of an object
byte to short
43. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
signed
prefix form
String substring (int offset - int endIndex)
literal
44. Returns the next input token as a character string.
signed
String next( )
accessor method
data values
45. A name for a location in memory used to hold a data value.
Random ( )
behaviors of an object
variable
underscores
46. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
parameter list
parameter
self-governing
called method
47. The one that is invoked
return statement
Random class
called method
instantiation
48. 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
java.util class libary
java.lang package
prefix form
49. 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
mutator method
primitive variables
wrapper class
String toUpperCase ( )
50. Returns a new string consisting of this string concatenated with str.
the DecimalFormat class
boolean equals (String str)
long
String substring (int offset - int endIndex)