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. Each piece of data that we send to a method
char charAt (int index)
parameter
private
accessor method
2. The automatic conversion between a primitive value and a corresponding wrapper object.
instance variable
String toUpperCase ( )
service methods
autoboxing
3. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
String object
boolean nextBoolean( )
reserved word void
int compareTo (String str)
4. _____ expression evaluated first
polymorphism
RH
double
data values
5. Returns a new string consisting of this string concatenated with str.
uninitialized variables
promotion
String concat (String str)
not possible
6. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
local data
aliases
self-governing
instance data
7. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
byte to short
floating point numbers
dot operator
8. Part of the java.util class; picks a number at random out of a range of values.
String toLowerCase ( )
Random class
dot operator
mutator method
9. 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
assignment
Understanding
pointer
accessor method
10. Elements of input
parameter
self-governing
static int parseInt (String str)
tokens
11. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
a constructor
packages
tokens
12. Returns a new string consisting of this string concatenated with str.
String (String str)
actual parameters
Random class
boolean equals (String str)
13. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
java.lang package
import java.util*
parameter
service methods
14. Instance data should be defined with what________ visibility
parentheses
String substring (int offset - int endIndex)
private
java.util class libary
15. Returns the next input token as the indicated type.
byte nextByte( )
java.lang package
String format (double number)
called method
16. 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
boolean equalsIgnoreCase (String str)
method invocation
signed
public
17. Four integer data types: byte - short - int - _____
String toLowerCase ( )
conditional statement
long
NumberFormat class
18. The Scanner class is part of ___________________
encapsulation of an object
char charAt (int index)
java.util class libary
java.lang package
19. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
encapsulation
the DecimalFormat class
flow of control
20. 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
parameter
byte nextByte( )
method
Scanner scan=new Scanner (System.in);
21. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
Scanner scan=new Scanner (System.in);
String next( )
called method
22. Begins with a backslash character ""
escape sequences
inheritance
String nextLine( )
String (String str)
23. Modifier>type/void>identifier>parameters>method body
constants
method declaration
the "import" declaration
string name;
24. 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
byte nextByte( )
packages
reference
25. The order in which statements are executed in a running program
flow of control
class
constants
boolean hasNext( )
26. Attempts to find the next occurence of the specified pattern - ignoring delimiters
polymorphism
String findInLine (String pattern)
character string
boolean nextBoolean( )
27. A method that returns a value must have a _________
int compareTo (String str)
boolean hasNext( )
return statement
behaviors of an object
28. The names of the parameters in the header of the method declaration
mutator method
NumberFormat class
formal parameters
assignment statement
29. The one that is invoked
Scanner useDelimiter(String pattern)
state of an object
called method
accessor method
30. Represents either a primitive value or an object
character literal
attributes of an object
variable name
not possible
31. Widening byte: _________ - to int - to long - to float - to double
higher
string literal
parameter
byte to short
32. Boolean type conversions are ___________
static
mutator method
not possible
the DecimalFormat class
33. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
initialize
signed
the "import" declaration
34. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
formal parameters
String concat (String str)
Random ( )
constructors
35. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
public
boolean value
not possible
the "import" declaration
36. A ________________ is immutable.
java.util class libary
String object
String nextLine( )
enumerated type
37. ______________ operators have higher precedence
state of an object
String (String str)
boolean hasNext( )
arithmetic
38. Sets the scanner's delimiting pattern.
instance data
wrapper class
conditionals
Scanner useDelimiter(String pattern)
39. Methods in the Math class are ______
encapsulation of an object
string name;
wrapper class
static
40. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
the "import" declaration
variable name
boolean nextBoolean( )
41. ++count; -- count
inheritance
literal
Understanding
prefix form
42. sides=10;
method invocation
String next( )
assignment statement
boolean nextBoolean( )
43. 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 -
class
boolean nextBoolean( )
string literal
enumerated type
44. ____________ is instantiated in the traditional way using the new operator.
constants
expression
the DecimalFormat class
class library
45. 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
System.out.println
variable declaration
aliases
boolean nextBoolean( )
46. Returns the number of characters in this stirng.
num=Integer.parseInt(str);
dot operator
int length( )
visibility modifiers
47. 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.
uninitialized variables
parameter list
set
String toUpperCase ( )
48. 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
encapsulation
System.out.println
class level
conditionals
49. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean hasNext( )
String format (double number)
boolean equalsIgnoreCase (String str)
class level
50. Returns true if the scanner has anotehr token in its input.
support methods
int length( )
floating point numbers
boolean hasNext( )