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. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
promotion
String toLowerCase ( )
String nextLine( )
Random ( )
2. An explicit data value used in a program
casting
literal
polymorphism
boolean equals (String str)
3. Constructor: creates a new string object with the same characters as str.
String (String str)
class
private
Scanner scan=new Scanner (System.in);
4. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
char charAt (int index)
String substring (int offset - int endIndex)
behaviors of an object
5. Constructors do not even _______; therefore they cannot return a value.
parameter
method declaration
attributes of an object
have void
6. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
instance data
String toLowerCase ( )
constants
constructors
7. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
escape sequences
boolean hasNext( )
primitive variables
state of an object
8. Returns the next input token as a character string.
assignment statement
String next( )
private
String format (double number)
9. 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
not possible
String next( )
Scanner class
conditional statement
10. 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
higher
inheritance
byte nextByte( )
java.lang package
11. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
constructors
support methods
tokens
service methods
12. Declared in a class but not inside any particular method
instance data
accessor method
set
Scanner class
13. Count++; count--
character string
method
postfix form
have void
14. An object has behaviors - which are defined by the ________ associated with that object.
boolean equalsIgnoreCase (String str)
Understanding
operations
int compareTo (String str)
15. 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 -
Scanner class
class
encapsulation of an object
inheritance
16. Boolean type conversions are ___________
underscores
not possible
local data
class
17. 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
a constructor
static
uninitialized variables
wrapper class
18. The one that is invoked
called method
constructors
String toLowerCase ( )
have void
19. 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 value
higher
boolean equalsIgnoreCase (String str)
boolean hasNext( )
20. A value that is passed into a method when it is invoked
byte to short
parameter
private
prefix form
21. _____ expression evaluated first
String format (double number)
String replace (char oldChar - char newChar)
method
RH
22. When a variable is declared inside a method
local data
have void
self-governing
higher
23. Each piece of data that we send to a method
constructors
parameter
double
import java.util*
24. Returns all input remaining on the current line as a character string.
String nextLine( )
floating point numbers
behaviors of an object
boolean value
25. Attempts to find the next occurence of the specified pattern - ignoring delimiters
called method
parameter
long
String findInLine (String pattern)
26. Elements of input
tokens
packages
autoboxing
behaviors of an object
27. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
char charAt (int index)
service methods
String toUpperCase ( )
pointer
28. Delimited by double quotation characters
set
inheritance
support methods
string literal
29. The Scanner class is part of ___________________
boolean nextBoolean( )
java.util class libary
character string
variable
30. They clarify the role a certain number has in the program.
accessor method
instance variable
instance data
constants
31. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
System.out.println
public
instantiation
boolean equalsIgnoreCase (String str)
32. Four integer data types: byte - short - int - _____
long
constructors
string literal
arithmetic
33. The declarations of object variables have a similar structure to the declaration of _______________
String findInLine (String pattern)
primitive variables
variable name
string name;
34. A set of classes that supports the development of programs
class library
autoboxing
Understanding
boolean equalsIgnoreCase (String str)
35. Begins with a backslash character ""
service methods
escape sequences
operations
string name;
36. 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
String toLowerCase ( )
data values
character string
expression
37. 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.
static int parseInt (String str)
enumerated type
String format (double number)
Random ( )
38. A ________________ is immutable.
String substring (int offset - int endIndex)
constants
parameter list
String object
39. Instance data should be defined with what________ visibility
constants
instance variable
conditionals
private
40. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
state of an object
expression
instance variable
encapsulation
41. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
long
uninitialized variables
variable declaration
parentheses
42. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
uninitialized variables
int length( )
the "import" declaration
string literal
43. 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.
support methods
encapsulation
the DecimalFormat class
scope
44. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
behaviors of an object
import java.util*
conditional statement
class
45. 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.
assignment
encapsulation
polymorphism
int compareTo (String str)
46. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
variable
NumberFormat class
operations
state of an object
47. Part of the java.util class; picks a number at random out of a range of values.
attributes of an object
casting
delimiters
Random class
48. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
java.util class libary
not possible
reference
49. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
class library
accessor method
Understanding
Scanner useDelimiter(String pattern)
50. Returns the number of characters in this stirng.
Scanner useDelimiter(String pattern)
dot operator
int length( )
variable name