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. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
Scanner class
java.lang package
service methods
encapsulation of an object
2. Part of the java.util class; picks a number at random out of a range of values.
instance data
Random class
class level
variable declaration
3. 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
variable name
aliases
a constructor
java.util class libary
4. 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
string name;
encapsulation of an object
string literal
null
5. Every object has two things: a state and a _____ of behaviors
set
data values
instance data
flow of control
6. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
scope
variable declaration
String (String str)
delimiters
7. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
java.lang package
higher
character literal
8. 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 nextBoolean( )
constants
method invocation
the DecimalFormat class
9. All numeric types are _______ - meaning both positive and negative values can be stored in them
set
arithmetic
signed
instance variable
10. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
java.util class libary
floating point numbers
byte to short
Scanner class
11. Constructor: creates a new pseudorandom number generator.
operations
java.util class libary
Random ( )
String (String str)
12. A set of classes that supports the development of programs
the "import" declaration
method declaration
class library
underscores
13. sides=10;
the "import" declaration
state of an object
static int parseInt (String str)
assignment statement
14. They clarify the role a certain number has in the program.
String substring (int offset - int endIndex)
String findInLine (String pattern)
class
constants
15. 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.
primitive variables
visibility modifiers
string literal
pointer
16. Modifier>type/void>identifier>parameters>method body
assignment conversion
method declaration
called method
character string
17. Attempts to find the next occurence of the specified pattern - ignoring delimiters
casting
instantiation
String findInLine (String pattern)
support methods
18. Instance data should be defined with what________ visibility
private
state of an object
String replace (char oldChar - char newChar)
declared
19. Declared in a class but not inside any particular method
instance data
parameter list
String toUpperCase ( )
String concat (String str)
20. Returns the number of characters in this stirng.
int length( )
String (String str)
String concat (String str)
promotion
21. The order in which statements are executed in a running program
constructors
reference
flow of control
service methods
22. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
escape sequences
aliases
promotion
23. The one that is invoked
header of a method
string name;
NumberFormat class
called method
24. The names of the parameters in the header of the method declaration
String next( )
double
formal parameters
mutator method
25. Two floating data types: float - _______
int compareTo (String str)
class library
escape sequences
double
26. Returns all input remaining on the current line as a character string.
String nextLine( )
prefix form
String toUpperCase ( )
conditionals
27. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
escape sequences
boolean equalsIgnoreCase (String str)
state of an object
initialize
28. When a variable is declared inside a method
local data
int compareTo (String str)
postfix form
String replace (char oldChar - char newChar)
29. An object in Java - defined by the class String
character string
num=Integer.parseInt(str);
null
encapsulation
30. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String replace (char oldChar - char newChar)
return statement
null
behaviors of an object
31. format for constants: all upper-case; separated by ________
RH
assignment
underscores
reserved word void
32. 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
parentheses
conditionals
operations
aliases
33. ++count; -- count
prefix form
java.util class libary
arithmetic
java.lang package
34. All wrapper classes are defined in ___________
string name;
java.lang package
java.util class libary
import java.util*
35. Returns true if the scanner has anotehr token in its input.
inheritance
class library
boolean hasNext( )
boolean nextBoolean( )
36. The values passed into a method in an invocation; these are called the arguments to the method
packages
NumberFormat class
reserved word void
actual parameters
37. Returns the next input token as the indicated type.
parameter
boolean value
support methods
byte nextByte( )
38. Widening byte: _________ - to int - to long - to float - to double
byte to short
accessor method
assignment conversion
Random ( )
39. Methods in the Math class are ______
static
long
boolean hasNext( )
local data
40. Represents either a primitive value or an object
variable name
pointer
String toLowerCase ( )
boolean equalsIgnoreCase (String str)
41. A class usually provides services to access and modify __________
java.lang package
String toLowerCase ( )
data values
reserved word void
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
attributes of an object
arithmetic
reserved word void
packages
43. 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
conditional statement
Scanner class
String toUpperCase ( )
RH
44. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
operations
casting
initialize
45. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
support methods
string literal
char charAt (int index)
46. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
enumerated type
long
boolean equals (String str)
promotion
47. 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
delimiters
the DecimalFormat class
char charAt (int index)
boolean value
48. Constructors do not even _______; therefore they cannot return a value.
primitive variables
have void
set
String concat (String str)
49. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
Scanner useDelimiter(String pattern)
String toLowerCase ( )
set
static
50. Constants are ______ because the can't be changed once you use the final modifier
signed
assignment conversion
tokens
public