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 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
operations
String toUpperCase ( )
have void
2. Two categories of statements that control the flow of executing through a method: __________ and loops
formal parameters
char charAt (int index)
conditionals
constants
3. Part of the java.util class; picks a number at random out of a range of values.
Random class
null
java.lang package
tokens
4. The act of creating an object using the "new" operator
packages
encapsulation
instantiation
return statement
5. White space characters such as space characters - tabs - and new lines that separate the elements of input
a constructor
java.lang package
delimiters
byte nextByte( )
6. 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
dot operator
a constructor
character string
string name;
7. This declaration creates a Scanner object that reads input from the keyboard
boolean hasNext( )
parameter list
Scanner scan=new Scanner (System.in);
underscores
8. Four integer data types: byte - short - int - _____
System.out.println
long
pointer
delimiters
9. ____________ is instantiated in the traditional way using the new operator.
attributes of an object
service methods
class library
the DecimalFormat class
10. 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.
variable
String toUpperCase ( )
polymorphism
prefix form
11. Delimited by double quotation characters
string literal
public
boolean equalsIgnoreCase (String str)
visibility modifiers
12. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
java.util class libary
the "import" declaration
boolean value
delimiters
13. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
byte to short
class
int compareTo (String str)
boolean nextBoolean( )
14. Three ways in which Java conversions occur: _________ conversion - promotion - casting
boolean equalsIgnoreCase (String str)
header of a method
expression
assignment
15. Expressed in a Java program with single quotes
uninitialized variables
String toLowerCase ( )
character literal
not possible
16. Modifier>type/void>identifier>parameters>method body
Scanner class
method declaration
String next( )
have void
17. Constants are ______ because the can't be changed once you use the final modifier
NumberFormat class
java.lang package
aliases
public
18. 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
scope
not possible
aliases
instance variable
19. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.
encapsulation
support methods
instantiation
delimiters
20. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
import java.util*
floating point numbers
literal
reserved word void
21. Returns the number of characters in this stirng.
NumberFormat class
parentheses
int length( )
actual parameters
22. sides=10;
double
visibility modifiers
assignment statement
operations
23. The classes of the Java standard class library are grouped into __________.
boolean equalsIgnoreCase (String str)
packages
String toUpperCase ( )
class level
24. Sets the scanner's delimiting pattern.
String nextLine( )
Scanner useDelimiter(String pattern)
NumberFormat class
parameter list
25. Returns the character at the specified index.
variable declaration
conditionals
String toLowerCase ( )
char charAt (int index)
26. An object has behaviors - which are defined by the ________ associated with that object.
operations
boolean value
class
polymorphism
27. 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.
boolean hasNext( )
parameter list
Scanner scan=new Scanner (System.in);
assignment conversion
28. Boolean type conversions are ___________
java.util class libary
not possible
formal parameters
signed
29. They clarify the role a certain number has in the program.
byte nextByte( )
operations
constants
postfix form
30. Returns a string containing the specified number formatted according to this object's pattern.
operations
String toUpperCase ( )
String replace (char oldChar - char newChar)
String format (double number)
31. 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
instance variable
conditionals
a constructor
return statement
32. _____ expression evaluated first
not possible
support methods
RH
higher
33. 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
Random class
expression
string name;
int compareTo (String str)
34. Returns the next input token as a character string.
RH
variable name
String concat (String str)
String next( )
35. 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
signed
String nextLine( )
method invocation
String object
36. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
character string
public
prefix form
37. ______________ operators have higher precedence
private
arithmetic
header of a method
String (String str)
38. Also called a selection statement b/c it allows us to choose which statement will be executed next.
method declaration
inheritance
declared
conditional statement
39. When a variable is declared inside a method
higher
conditional statement
local data
String nextLine( )
40. Returns the next input token as the indicated type.
boolean nextBoolean( )
initialize
java.util class libary
null
41. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
accessor method
tokens
constants
String toLowerCase ( )
42. The Scanner class is part of ___________________
instantiation
initialize
string literal
java.util class libary
43. Before you use a variable __________it
encapsulation
boolean equals (String str)
service methods
initialize
44. 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
inheritance
formal parameters
variable
instance data
45. 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
System.out.println
called method
boolean value
instantiation
46. After an object has been instantiated - we set the _________ to access its methods
literal
dot operator
inheritance
instance data
47. 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
wrapper class
String (String str)
actual parameters
escape sequences
48. Constructor: creates a new pseudorandom number generator.
class level
Random ( )
String concat (String str)
reference
49. 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 -
char charAt (int index)
character literal
data values
class
50. Constructors do not even _______; therefore they cannot return a value.
formal parameters
postfix form
have void
Random class