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. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
boolean equalsIgnoreCase (String str)
actual parameters
String next( )
2. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
variable declaration
Random ( )
self-governing
accessor method
3. 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
double
boolean hasNext( )
method
polymorphism
4. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
variable declaration
method
parentheses
expression
5. 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:
escape sequences
num=Integer.parseInt(str);
wrapper class
static
6. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
scope
mutator method
header of a method
RH
7. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
reserved word void
static int parseInt (String str)
behaviors of an object
8. Methods in the Math class are ______
behaviors of an object
static
boolean value
mutator method
9. A name for a location in memory used to hold a data value.
variable
service methods
inheritance
string name;
10. The order in which statements are executed in a running program
class
num=Integer.parseInt(str);
constants
flow of control
11. Returns a new string consisting of this string concatenated with str.
assignment
boolean hasNext( )
boolean equals (String str)
encapsulation of an object
12. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
casting
Random ( )
RH
13. All numeric types are _______ - meaning both positive and negative values can be stored in them
flow of control
aliases
signed
parameter
14. Also called a selection statement b/c it allows us to choose which statement will be executed next.
inheritance
the "import" declaration
conditional statement
RH
15. A ________________ is immutable.
instantiation
String object
Random class
byte to short
16. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
java.lang package
formal parameters
inheritance
17. 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
constants
variable declaration
arithmetic
support methods
18. 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.
mutator method
constructors
visibility modifiers
double
19. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
signed
assignment conversion
instance data
String replace (char oldChar - char newChar)
20. Instance data should be defined with what________ visibility
aliases
private
delimiters
behaviors of an object
21. format for constants: all upper-case; separated by ________
assignment conversion
underscores
parameter
String concat (String str)
22. 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.
visibility modifiers
encapsulation
boolean hasNext( )
tokens
23. A class usually provides services to access and modify __________
data values
variable declaration
encapsulation
class library
24. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
int length( )
constructors
service methods
String replace (char oldChar - char newChar)
25. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
character literal
static int parseInt (String str)
java.util class libary
26. Returns the next input token as a character string.
boolean nextBoolean( )
String next( )
String findInLine (String pattern)
parentheses
27. Modifier>type/void>identifier>parameters>method body
String toLowerCase ( )
attributes of an object
method declaration
class library
28. Each piece of data that we send to a method
support methods
parameter
called method
reserved word void
29. Two floating data types: float - _______
instance variable
boolean equalsIgnoreCase (String str)
declared
double
30. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
instantiation
constants
literal
String toUpperCase ( )
31. 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
set
expression
the "import" declaration
literal
32. _____ expression evaluated first
String replace (char oldChar - char newChar)
RH
String toUpperCase ( )
instantiation
33. ______________ operators have higher precedence
boolean nextBoolean( )
arithmetic
constants
null
34. Widening byte: _________ - to int - to long - to float - to double
postfix form
parameter
class library
byte to short
35. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
scope
behaviors of an object
casting
36. Variables that don't contain any data
not possible
private
declared
uninitialized variables
37. Returns the int corresponding to the value stored in the specified string
data values
static int parseInt (String str)
instance data
Random class
38. The values passed into a method in an invocation; these are called the arguments to the method
actual parameters
NumberFormat class
instance variable
literal
39. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String object
java.lang package
support methods
primitive variables
40. 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
boolean equals (String str)
Scanner useDelimiter(String pattern)
visibility modifiers
casting
41. 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
encapsulation of an object
aliases
polymorphism
variable name
42. A set of classes that supports the development of programs
casting
class library
pointer
String concat (String str)
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 library
java.lang package
boolean hasNext( )
class
44. Constructor: creates a new pseudorandom number generator.
boolean equals (String str)
static int parseInt (String str)
Random ( )
variable name
45. sides=10;
assignment statement
Scanner class
aliases
double
46. Delimited by double quotation characters
string literal
accessor method
int compareTo (String str)
instance data
47. The one that is invoked
String object
class level
declared
called method
48. Cast operator has _________ precedence to division
parameter list
encapsulation
higher
String toUpperCase ( )
49. ____________ is instantiated in the traditional way using the new operator.
variable declaration
pointer
String toUpperCase ( )
the DecimalFormat class
50. Expressed in a Java program with single quotes
String toUpperCase ( )
String nextLine( )
Scanner useDelimiter(String pattern)
character literal