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 all input remaining on the current line as a character string.
parameter list
expression
String nextLine( )
prefix form
2. 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
String concat (String str)
Scanner scan=new Scanner (System.in);
inheritance
3. 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
num=Integer.parseInt(str);
arithmetic
inheritance
String findInLine (String pattern)
4. sides=10;
int length( )
assignment statement
method
operations
5. The order in which statements are executed in a running program
flow of control
enumerated type
byte to short
self-governing
6. 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
data values
tokens
constants
aliases
7. Sets the scanner's delimiting pattern.
String toLowerCase ( )
num=Integer.parseInt(str);
parentheses
Scanner useDelimiter(String pattern)
8. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
dot operator
attributes of an object
String toUpperCase ( )
a constructor
9. ______________ operators have higher precedence
arithmetic
the DecimalFormat class
character string
static
10. The act of creating an object using the "new" operator
String format (double number)
method declaration
byte nextByte( )
instantiation
11. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
set
parameter
public
instance variable
12. A null reference indicates that a variable does not refer to an object
null
Understanding
reserved word void
parentheses
13. 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
formal parameters
dot operator
String concat (String str)
a constructor
14. Before you use a variable __________it
Scanner useDelimiter(String pattern)
initialize
aliases
service methods
15. Returns the next input token as a character string.
character string
String next( )
higher
reserved word void
16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
formal parameters
boolean nextBoolean( )
visibility modifiers
self-governing
17. 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
service methods
String toLowerCase ( )
casting
accessor method
18. 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
parameter
expression
mutator method
conditionals
19. Variables that don't contain any data
String (String str)
uninitialized variables
variable
tokens
20. An object in Java - defined by the class String
actual parameters
behaviors of an object
character string
char charAt (int index)
21. A value that is passed into a method when it is invoked
parameter
packages
class library
the "import" declaration
22. 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.
java.util class libary
promotion
String replace (char oldChar - char newChar)
parameter list
23. 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
int compareTo (String str)
java.lang package
static
24. Constructors do not even _______; therefore they cannot return a value.
attributes of an object
string literal
have void
parameter
25. The Scanner class is part of ___________________
String object
packages
java.util class libary
class
26. 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
class
Scanner class
null
dot operator
27. 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
boolean value
java.lang package
java.lang package
reference
28. The values passed into a method in an invocation; these are called the arguments to the method
boolean nextBoolean( )
literal
underscores
actual parameters
29. Returns the next input token as the indicated type.
promotion
encapsulation of an object
class level
byte nextByte( )
30. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held
string literal
tokens
String replace (char oldChar - char newChar)
pointer
31. Part of the java.util class; picks a number at random out of a range of values.
Random class
pointer
String object
attributes of an object
32. A method that returns a value must have a _________
static int parseInt (String str)
java.lang package
method
return statement
33. 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
int length( )
Understanding
service methods
declared
34. Delimited by double quotation characters
String toUpperCase ( )
string literal
wrapper class
a constructor
35. An explicit data value used in a program
uninitialized variables
literal
public
polymorphism
36. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
constructors
floating point numbers
boolean equalsIgnoreCase (String str)
37. A variable that refers to an object must be __________
flow of control
byte to short
declared
method
38. ____________ is instantiated in the traditional way using the new operator.
RH
the DecimalFormat class
called method
constants
39. 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
instance variable
operations
String findInLine (String pattern)
wrapper class
40. 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.
String toUpperCase ( )
visibility modifiers
String toLowerCase ( )
Scanner class
41. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
literal
aliases
scope
42. Attempts to find the next occurence of the specified pattern - ignoring delimiters
boolean equals (String str)
String findInLine (String pattern)
class
class level
43. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
parameter
character string
enumerated type
44. White space characters such as space characters - tabs - and new lines that separate the elements of input
public
assignment conversion
escape sequences
delimiters
45. Modifier>type/void>identifier>parameters>method body
method declaration
character string
string literal
byte to short
46. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
attributes of an object
constructors
String substring (int offset - int endIndex)
47. The declarations of object variables have a similar structure to the declaration of _______________
arithmetic
primitive variables
java.lang package
packages
48. Two floating data types: float - _______
class
double
assignment conversion
conditional statement
49. Returns true if the scanner has anotehr token in its input.
encapsulation
string literal
Scanner scan=new Scanner (System.in);
boolean hasNext( )
50. The names of the parameters in the header of the method declaration
System.out.println
called method
formal parameters
underscores