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. Count++; count--
NumberFormat class
Scanner scan=new Scanner (System.in);
postfix form
autoboxing
2. Declared in a class but not inside any particular method
int length( )
Random class
instance data
inheritance
3. A method that returns a value must have a _________
escape sequences
double
return statement
local data
4. 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
NumberFormat class
attributes of an object
underscores
header of a method
5. Returns the next input token as the indicated type.
boolean nextBoolean( )
have void
floating point numbers
encapsulation of an object
6. They clarify the role a certain number has in the program.
constants
character string
flow of control
autoboxing
7. 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
double
signed
Understanding
boolean hasNext( )
8. 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.
byte nextByte( )
boolean equalsIgnoreCase (String str)
boolean nextBoolean( )
enumerated type
9. 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.
java.lang package
reserved word void
pointer
underscores
10. 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
local data
boolean equalsIgnoreCase (String str)
called method
wrapper class
11. 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
int length( )
inheritance
wrapper class
variable declaration
12. The declarations of object variables have a similar structure to the declaration of _______________
constants
primitive variables
encapsulation of an object
instantiation
13. 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.
Scanner class
java.lang package
polymorphism
method
14. The values passed into a method in an invocation; these are called the arguments to the method
set
private
Understanding
actual parameters
15. Elements of input
dot operator
method
floating point numbers
tokens
16. Returns the next input token as a character string.
private
String next( )
expression
static int parseInt (String str)
17. Before you use a variable __________it
Scanner useDelimiter(String pattern)
boolean hasNext( )
service methods
initialize
18. A set of classes that supports the development of programs
class library
promotion
a constructor
have void
19. Constructor: creates a new pseudorandom number generator.
Random ( )
constructors
private
import java.util*
20. Delimited by double quotation characters
parentheses
promotion
string literal
signed
21. After an object has been instantiated - we set the _________ to access its methods
parameter list
dot operator
actual parameters
conditionals
22. A variable that refers to an object must be __________
declared
conditional statement
header of a method
underscores
23. 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
java.lang package
conditional statement
operations
24. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
System.out.println
actual parameters
have void
25. format for constants: all upper-case; separated by ________
service methods
tokens
underscores
character string
26. Returns the character at the specified index.
char charAt (int index)
String toUpperCase ( )
variable name
parameter
27. The order in which statements are executed in a running program
double
higher
java.lang package
flow of control
28. All wrapper classes are defined in ___________
string name;
boolean equals (String str)
reference
java.lang package
29. The Scanner class is part of ___________________
method declaration
string literal
double
java.util class libary
30. An object has behaviors - which are defined by the ________ associated with that object.
NumberFormat class
static int parseInt (String str)
byte nextByte( )
operations
31. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
parameter
int compareTo (String str)
boolean nextBoolean( )
num=Integer.parseInt(str);
32. Constructor: creates a new string object with the same characters as str.
arithmetic
String (String str)
attributes of an object
have void
33. Returns a new string consisting of this string concatenated with str.
int length( )
mutator method
boolean hasNext( )
boolean equals (String str)
34. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
aliases
service methods
method
static
35. A name for a location in memory used to hold a data value.
variable
method declaration
instance variable
String nextLine( )
36. 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
int length( )
arithmetic
string name;
method invocation
37. 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.
data values
wrapper class
pointer
visibility modifiers
38. 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
boolean equals (String str)
instance data
string name;
inheritance
39. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
Random class
conditional statement
String replace (char oldChar - char newChar)
byte nextByte( )
40. Returns all input remaining on the current line as a character string.
String nextLine( )
character string
postfix form
self-governing
41. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
int length( )
method
uninitialized variables
42. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
state of an object
literal
expression
polymorphism
43. 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
expression
variable name
String toLowerCase ( )
44. 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
double
boolean value
pointer
higher
45. Returns the next input token as the indicated type.
static int parseInt (String str)
byte nextByte( )
instance variable
arithmetic
46. Returns the number of characters in this stirng.
literal
int length( )
the DecimalFormat class
RH
47. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
null
java.lang package
instance variable
Understanding
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.
packages
parameter list
service methods
String format (double number)
49. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
conditionals
NumberFormat class
prefix form
arithmetic
50. White space characters such as space characters - tabs - and new lines that separate the elements of input
null
Random class
escape sequences
delimiters