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. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
formal parameters
instance data
java.lang package
prefix form
2. Changes a particular value - e.g.setX - where X is the value they are setting.
boolean equals (String str)
String next( )
reserved word void
mutator method
3. Variables that don't contain any data
uninitialized variables
string name;
packages
constants
4. 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
instance variable
assignment conversion
Understanding
variable declaration
5. All wrapper classes are defined in ___________
System.out.println
java.lang package
method declaration
Scanner scan=new Scanner (System.in);
6. Returns a new string consisting of this string concatenated with str.
assignment
String next( )
attributes of an object
String concat (String str)
7. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
RH
Scanner scan=new Scanner (System.in);
NumberFormat class
visibility modifiers
8. 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.
called method
the "import" declaration
behaviors of an object
encapsulation
9. Represents either a primitive value or an object
RH
postfix form
variable name
promotion
10. Constructor: creates a new string object with the same characters as str.
promotion
character literal
String (String str)
static int parseInt (String str)
11. The order in which statements are executed in a running program
string literal
flow of control
String replace (char oldChar - char newChar)
static int parseInt (String str)
12. Elements of input
arithmetic
tokens
local data
method invocation
13. 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
self-governing
method
String toLowerCase ( )
static
14. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
RH
support methods
polymorphism
actual parameters
15. Constructors do not even _______; therefore they cannot return a value.
have void
signed
enumerated type
String nextLine( )
16. 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
Understanding
String toLowerCase ( )
pointer
null
17. Two floating data types: float - _______
reference
inheritance
double
instance data
18. A null reference indicates that a variable does not refer to an object
not possible
null
constants
assignment statement
19. 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
formal parameters
NumberFormat class
String (String str)
20. Modifier>type/void>identifier>parameters>method body
String nextLine( )
method declaration
string name;
boolean nextBoolean( )
21. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
mutator method
Random class
parentheses
import java.util*
22. 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
constants
public
boolean value
instantiation
23. A variable that refers to an object must be __________
instance data
tokens
mutator method
declared
24. Sets the scanner's delimiting pattern.
casting
Scanner useDelimiter(String pattern)
primitive variables
declared
25. 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
dot operator
expression
assignment conversion
String toUpperCase ( )
26. Boolean type conversions are ___________
conditional statement
encapsulation
not possible
flow of control
27. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
prefix form
constructors
boolean equals (String str)
variable
28. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
reserved word void
attributes of an object
expression
29. Declared in a class but not inside any particular method
method invocation
instance data
expression
private
30. 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
Understanding
num=Integer.parseInt(str);
escape sequences
attributes of an object
31. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
behaviors of an object
enumerated type
String replace (char oldChar - char newChar)
promotion
32. A set of classes that supports the development of programs
enumerated type
char charAt (int index)
class library
string literal
33. The classes of the Java standard class library are grouped into __________.
scope
escape sequences
String findInLine (String pattern)
packages
34. Cast operator has _________ precedence to division
arithmetic
flow of control
higher
method declaration
35. 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
class library
char charAt (int index)
polymorphism
Scanner class
36. Methods in the Math class are ______
conditionals
variable
static
inheritance
37. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
packages
set
not possible
header of a method
38. 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)
escape sequences
literal
local data
39. Count++; count--
attributes of an object
boolean hasNext( )
postfix form
literal
40. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
Random class
floating point numbers
String format (double number)
behaviors of an object
41. Instance data should be defined with what________ visibility
static
private
escape sequences
String concat (String str)
42. Delimited by double quotation characters
int length( )
java.util class libary
autoboxing
string literal
43. _____ expression evaluated first
attributes of an object
RH
null
a constructor
44. A value that is passed into a method when it is invoked
boolean equals (String str)
parameter
variable
boolean value
45. ______________ operators have higher precedence
character literal
arithmetic
tokens
parameter
46. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
constructors
String nextLine( )
String toUpperCase ( )
NumberFormat class
47. 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
casting
parameter
char charAt (int index)
NumberFormat class
48. 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
visibility modifiers
string literal
service methods
method invocation
49. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
num=Integer.parseInt(str);
String findInLine (String pattern)
service methods
scope
50. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
String concat (String str)
instantiation
the DecimalFormat class