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 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
method
boolean hasNext( )
attributes of an object
the "import" declaration
2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
assignment statement
NumberFormat class
uninitialized variables
floating point numbers
3. 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.
long
have void
behaviors of an object
scope
4. Returns the next input token as the indicated type.
behaviors of an object
autoboxing
boolean nextBoolean( )
return statement
5. ++count; -- count
static
prefix form
enumerated type
Random ( )
6. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
a constructor
behaviors of an object
Random class
String nextLine( )
7. A variable that refers to an object must be __________
declared
wrapper class
byte nextByte( )
attributes of an object
8. Changes a particular value - e.g.setX - where X is the value they are setting.
java.lang package
header of a method
packages
mutator method
9. Count++; count--
header of a method
called method
method declaration
postfix form
10. Three ways in which Java conversions occur: _________ conversion - promotion - casting
variable declaration
conditionals
assignment
String nextLine( )
11. Returns the character at the specified index.
conditional statement
int compareTo (String str)
method
char charAt (int index)
12. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
class library
expression
public
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
java.lang package
instance data
conditional statement
a constructor
14. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
Random class
java.lang package
promotion
escape sequences
15. 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.
static int parseInt (String str)
character literal
polymorphism
formal parameters
16. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
instance variable
not possible
java.lang package
parentheses
17. The act of creating an object using the "new" operator
self-governing
instantiation
polymorphism
dot operator
18. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
encapsulation of an object
visibility modifiers
signed
19. The classes of the Java standard class library are grouped into __________.
conditionals
packages
Random class
self-governing
20. 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
attributes of an object
aliases
literal
casting
21. Variables and constants can be referenced in any method of the class by declaring at the _________
conditional statement
method
parameter list
class level
22. format for constants: all upper-case; separated by ________
underscores
method declaration
String format (double number)
static
23. 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
boolean nextBoolean( )
java.util class libary
pointer
24. The order in which statements are executed in a running program
constants
flow of control
character string
scope
25. Declared in a class but not inside any particular method
instance data
string name;
variable name
expression
26. Defined and then used as the type of a variable when it is declared; establishes all possible values of a variable of that type by listing - or enumerating - them.
parameter
class library
enumerated type
accessor method
27. 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
initialize
inheritance
casting
int length( )
28. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
double
visibility modifiers
instance variable
29. Returns a new string consisting of this string concatenated with str.
String concat (String str)
boolean equals (String str)
int compareTo (String str)
casting
30. 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
assignment conversion
method invocation
char charAt (int index)
constants
31. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
literal
state of an object
support methods
double
32. Part of the java.util class; picks a number at random out of a range of values.
String nextLine( )
packages
Random class
long
33. 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
variable declaration
String object
set
double
34. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
String toUpperCase ( )
Random class
String findInLine (String pattern)
35. All wrapper classes are defined in ___________
java.lang package
the DecimalFormat class
string literal
self-governing
36. sides=10;
assignment statement
string name;
dot operator
System.out.println
37. Instance data should be defined with what________ visibility
private
String format (double number)
constructors
variable declaration
38. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
autoboxing
literal
underscores
39. 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
actual parameters
state of an object
expression
promotion
40. The declarations of object variables have a similar structure to the declaration of _______________
uninitialized variables
instance data
String nextLine( )
primitive variables
41. Returns the next input token as a character string.
tokens
RH
literal
String next( )
42. 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
boolean equalsIgnoreCase (String str)
string name;
boolean value
arithmetic
43. The Scanner class is part of ___________________
class
java.util class libary
variable
byte to short
44. An object has behaviors - which are defined by the ________ associated with that object.
operations
variable
class level
String (String str)
45. Two categories of statements that control the flow of executing through a method: __________ and loops
boolean equalsIgnoreCase (String str)
conditionals
initialize
state of an object
46. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
packages
uninitialized variables
String replace (char oldChar - char newChar)
the DecimalFormat class
47. A ________________ is immutable.
instance variable
String toUpperCase ( )
polymorphism
String object
48. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
boolean nextBoolean( )
behaviors of an object
String toLowerCase ( )
boolean equalsIgnoreCase (String str)
49. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
header of a method
reserved word void
tokens
50. Begins with a backslash character ""
Scanner scan=new Scanner (System.in);
boolean equalsIgnoreCase (String str)
floating point numbers
escape sequences