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 values passed into a method in an invocation; these are called the arguments to the method
actual parameters
class level
char charAt (int index)
pointer
2. 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
inheritance
actual parameters
wrapper class
java.lang package
3. After an object has been instantiated - we set the _________ to access its methods
dot operator
polymorphism
inheritance
encapsulation of an object
4. The automatic conversion between a primitive value and a corresponding wrapper object.
called method
String (String str)
autoboxing
prefix form
5. All wrapper classes are defined in ___________
String nextLine( )
reserved word void
formal parameters
java.lang package
6. Returns all input remaining on the current line as a character string.
byte to short
String nextLine( )
state of an object
header of a method
7. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String next( )
String findInLine (String pattern)
uninitialized variables
String toLowerCase ( )
8. The order in which statements are executed in a running program
flow of control
String toLowerCase ( )
visibility modifiers
have void
9. Four integer data types: byte - short - int - _____
uninitialized variables
prefix form
long
class
10. Returns a new string consisting of this string concatenated with str.
static
parameter list
casting
boolean equals (String str)
11. Elements of input
encapsulation
method
method declaration
tokens
12. Part of the java.util class; picks a number at random out of a range of values.
java.lang package
Random class
NumberFormat class
int compareTo (String str)
13. 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
Understanding
NumberFormat class
local data
primitive variables
14. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
enumerated type
header of a method
aliases
conditionals
15. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
num=Integer.parseInt(str);
formal parameters
self-governing
String next( )
16. All numeric types are _______ - meaning both positive and negative values can be stored in them
character string
boolean hasNext( )
floating point numbers
signed
17. 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);
String format (double number)
byte nextByte( )
casting
18. 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
attributes of an object
promotion
char charAt (int index)
self-governing
19. sides=10;
local data
String substring (int offset - int endIndex)
scope
assignment statement
20. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
String replace (char oldChar - char newChar)
character string
String substring (int offset - int endIndex)
import java.util*
21. Also called a selection statement b/c it allows us to choose which statement will be executed next.
not possible
enumerated type
tokens
conditional statement
22. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
prefix form
the "import" declaration
method declaration
flow of control
23. The names of the parameters in the header of the method declaration
String replace (char oldChar - char newChar)
constants
assignment
formal parameters
24. 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
declared
a constructor
String next( )
the DecimalFormat class
25. We use an object when we have a _________ to it
scope
self-governing
parentheses
reference
26. 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.
promotion
boolean hasNext( )
polymorphism
higher
27. Cast operator has _________ precedence to division
String (String str)
higher
Random ( )
prefix form
28. Constructors do not even _______; therefore they cannot return a value.
the "import" declaration
Random ( )
Scanner useDelimiter(String pattern)
have void
29. 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
String next( )
boolean value
class
uninitialized variables
30. Returns the next input token as the indicated type.
polymorphism
higher
Understanding
byte nextByte( )
31. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
called method
boolean equalsIgnoreCase (String str)
Understanding
parentheses
32. The classes of the Java standard class library are grouped into __________.
called method
null
java.lang package
packages
33. Constants are ______ because the can't be changed once you use the final modifier
Random class
arithmetic
public
byte to short
34. A class usually provides services to access and modify __________
Random class
long
promotion
data values
35. Returns true if the scanner has anotehr token in its input.
parameter
conditionals
instantiation
boolean hasNext( )
36. An object in Java - defined by the class String
character string
System.out.println
reserved word void
dot operator
37. 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
static int parseInt (String str)
expression
instance data
mutator method
38. Count++; count--
encapsulation of an object
postfix form
visibility modifiers
static
39. The one that is invoked
called method
pointer
parameter
instance data
40. Returns the next input token as the indicated type.
enumerated type
int length( )
boolean nextBoolean( )
System.out.println
41. 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
variable name
Scanner class
postfix form
class
42. Variables and constants can be referenced in any method of the class by declaring at the _________
actual parameters
not possible
double
class level
43. A set of classes that supports the development of programs
attributes of an object
class library
character literal
flow of control
44. Each piece of data that we send to a method
arithmetic
reserved word void
parameter
assignment
45. 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
static
the DecimalFormat class
java.util class libary
pointer
46. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
autoboxing
java.lang package
Random class
literal
47. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
conditional statement
parameter list
casting
48. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
instantiation
int length( )
class
49. A variable that refers to an object must be __________
return statement
String replace (char oldChar - char newChar)
import java.util*
declared
50. Constructor: creates a new string object with the same characters as str.
boolean equals (String str)
String (String str)
support methods
String nextLine( )