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. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
character literal
character string
instance variable
not possible
2. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
operations
parameter
boolean value
3. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
Random class
String (String str)
packages
4. After an object has been instantiated - we set the _________ to access its methods
instance variable
prefix form
String format (double number)
dot operator
5. The declarations of object variables have a similar structure to the declaration of _______________
attributes of an object
primitive variables
boolean equals (String str)
aliases
6. Expressed in a Java program with single quotes
header of a method
higher
constants
character literal
7. Returns a new string consisting of this string concatenated with str.
boolean value
set
String concat (String str)
initialize
8. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
import java.util*
instance data
reference
9. Returns a new string consisting of this string concatenated with str.
prefix form
expression
boolean equals (String str)
behaviors of an object
10. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
Random class
variable declaration
parentheses
11. Constructor: creates a new pseudorandom number generator.
parentheses
String concat (String str)
double
Random ( )
12. _____ expression evaluated first
casting
RH
variable name
primitive variables
13. Declared in a class but not inside any particular method
instance data
delimiters
character string
tokens
14. Represents either a primitive value or an object
variable name
inheritance
null
static
15. 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 -
actual parameters
service methods
class
instance data
16. Two categories of statements that control the flow of executing through a method: __________ and loops
primitive variables
conditionals
higher
self-governing
17. ++count; -- count
floating point numbers
expression
prefix form
boolean nextBoolean( )
18. Returns true if the scanner has anotehr token in its input.
attributes of an object
wrapper class
boolean hasNext( )
String object
19. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
initialize
constants
encapsulation of an object
20. Also called a selection statement b/c it allows us to choose which statement will be executed next.
RH
packages
variable
conditional statement
21. Sets the scanner's delimiting pattern.
String object
escape sequences
Scanner useDelimiter(String pattern)
postfix form
22. 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
class level
underscores
byte nextByte( )
variable declaration
23. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
assignment
boolean equals (String str)
String toUpperCase ( )
static
24. An explicit data value used in a program
long
literal
wrapper class
parameter list
25. Constructors do not even _______; therefore they cannot return a value.
byte nextByte( )
casting
parentheses
have void
26. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
scope
expression
parameter
boolean equalsIgnoreCase (String str)
27. We use an object when we have a _________ to it
attributes of an object
String format (double number)
reference
String nextLine( )
28. 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
scope
parameter
casting
pointer
29. 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:
String substring (int offset - int endIndex)
num=Integer.parseInt(str);
reference
self-governing
30. Four integer data types: byte - short - int - _____
header of a method
conditional statement
long
reference
31. The classes of the Java standard class library are grouped into __________.
pointer
tokens
packages
parameter
32. 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.
literal
encapsulation
parameter list
flow of control
33. 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
NumberFormat class
pointer
String format (double number)
String object
34. 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
parentheses
java.lang package
35. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String substring (int offset - int endIndex)
the DecimalFormat class
delimiters
initialize
36. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
class
service methods
tokens
reference
37. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
instance data
wrapper class
encapsulation
parentheses
38. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
parentheses
the "import" declaration
boolean nextBoolean( )
long
39. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
encapsulation
have void
accessor method
int compareTo (String str)
40. When a variable is declared inside a method
String nextLine( )
expression
method declaration
local data
41. 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
null
java.util class libary
boolean value
42. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
parameter
formal parameters
literal
constructors
43. 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.
Scanner scan=new Scanner (System.in);
String object
scope
class
44. 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
reserved word void
System.out.println
promotion
set
45. Variables that don't contain any data
boolean nextBoolean( )
instantiation
uninitialized variables
underscores
46. This declaration creates a Scanner object that reads input from the keyboard
set
polymorphism
data values
Scanner scan=new Scanner (System.in);
47. ______________ operators have higher precedence
class
arithmetic
String object
prefix form
48. 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
public
underscores
set
49. 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
String object
escape sequences
scope
a constructor
50. A name for a location in memory used to hold a data value.
variable
behaviors of an object
boolean nextBoolean( )
string name;