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. 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
attributes of an object
header of a method
method
String next( )
2. Returns a new string consisting of this string concatenated with str.
class
String concat (String str)
encapsulation
constants
3. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
underscores
dot operator
int compareTo (String str)
floating point numbers
4. A value that is passed into a method when it is invoked
java.lang package
parentheses
initialize
parameter
5. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
data values
assignment statement
encapsulation
6. This declaration creates a Scanner object that reads input from the keyboard
parameter
Scanner scan=new Scanner (System.in);
Random ( )
service methods
7. 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
boolean hasNext( )
boolean value
visibility modifiers
the "import" declaration
8. 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
uninitialized variables
attributes of an object
int length( )
null
9. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
conditionals
enumerated type
boolean equalsIgnoreCase (String str)
byte to short
10. White space characters such as space characters - tabs - and new lines that separate the elements of input
assignment statement
boolean equalsIgnoreCase (String str)
delimiters
data values
11. 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
the DecimalFormat class
method invocation
delimiters
null
12. Three ways in which Java conversions occur: _________ conversion - promotion - casting
attributes of an object
assignment
int compareTo (String str)
uninitialized variables
13. They clarify the role a certain number has in the program.
escape sequences
packages
constants
parameter
14. Occurs when a value of one type is assigned to a variable of another type during which the value is converted to the new type.
the DecimalFormat class
Understanding
aliases
assignment conversion
15. A class usually provides services to access and modify __________
java.util class libary
String concat (String str)
data values
byte nextByte( )
16. Boolean type conversions are ___________
boolean hasNext( )
the "import" declaration
java.lang package
not possible
17. New memory space is reserved for that variable every time an instance of the class that is created.
arithmetic
polymorphism
Scanner useDelimiter(String pattern)
instance data
18. We use an object when we have a _________ to it
postfix form
parameter list
java.util class libary
reference
19. 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
System.out.println
set
casting
byte nextByte( )
20. Constants are ______ because the can't be changed once you use the final modifier
set
public
String replace (char oldChar - char newChar)
String toUpperCase ( )
21. The act of creating an object using the "new" operator
autoboxing
class level
instantiation
encapsulation
22. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String toUpperCase ( )
support methods
byte nextByte( )
conditionals
23. Returns the number of characters in this stirng.
int length( )
Scanner scan=new Scanner (System.in);
double
char charAt (int index)
24. An object in Java - defined by the class String
floating point numbers
public
String toUpperCase ( )
character string
25. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
enumerated type
static
private
promotion
26. Returns the int corresponding to the value stored in the specified string
String concat (String str)
local data
String toLowerCase ( )
static int parseInt (String str)
27. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
variable
declared
scope
28. 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
conditionals
inheritance
operations
Scanner useDelimiter(String pattern)
29. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
Understanding
not possible
operations
30. Expressed in a Java program with single quotes
java.lang package
RH
character literal
import java.util*
31. The classes of the Java standard class library are grouped into __________.
instance data
packages
prefix form
method
32. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
enumerated type
called method
NumberFormat class
byte nextByte( )
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
expression
byte nextByte( )
called method
num=Integer.parseInt(str);
34. The declarations of object variables have a similar structure to the declaration of _______________
String concat (String str)
primitive variables
behaviors of an object
escape sequences
35. When a variable is declared inside a method
parentheses
local data
System.out.println
double
36. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
flow of control
the "import" declaration
a constructor
int length( )
37. 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
variable
null
pointer
service methods
38. A method that returns a value must have a _________
return statement
initialize
autoboxing
Scanner useDelimiter(String pattern)
39. Each piece of data that we send to a method
floating point numbers
int length( )
the DecimalFormat class
parameter
40. 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.
postfix form
polymorphism
string name;
state of an object
41. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
actual parameters
escape sequences
String toUpperCase ( )
encapsulation of an object
42. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
constants
behaviors of an object
the "import" declaration
postfix form
43. 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:
num=Integer.parseInt(str);
have void
public
instantiation
44. Count++; count--
parameter list
variable name
higher
postfix form
45. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
parentheses
arithmetic
String nextLine( )
String toLowerCase ( )
46. Elements of input
tokens
String nextLine( )
reference
char charAt (int index)
47. An explicit data value used in a program
literal
uninitialized variables
Scanner scan=new Scanner (System.in);
packages
48. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
self-governing
String toUpperCase ( )
delimiters
String object
49. Represents either a primitive value or an object
byte to short
variable name
arithmetic
called method
50. _____ expression evaluated first
scope
RH
postfix form
String (String str)