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. Begins with a backslash character ""
delimiters
primitive variables
escape sequences
higher
2. Changes a particular value - e.g.setX - where X is the value they are setting.
method declaration
mutator method
parameter list
String substring (int offset - int endIndex)
3. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
conditionals
inheritance
encapsulation of an object
import java.util*
4. Each piece of data that we send to a method
Scanner useDelimiter(String pattern)
parameter
actual parameters
support methods
5. 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.
assignment conversion
autoboxing
String next( )
delimiters
6. A method that returns a value must have a _________
boolean value
constructors
return statement
instance data
7. Returns the number of characters in this stirng.
variable name
int length( )
class library
null
8. The classes of the Java standard class library are grouped into __________.
packages
method invocation
int compareTo (String str)
reference
9. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
Scanner class
escape sequences
data values
10. Modifier>type/void>identifier>parameters>method body
assignment statement
method declaration
String toUpperCase ( )
data values
11. 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.
polymorphism
String object
String concat (String str)
actual parameters
12. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
floating point numbers
promotion
actual parameters
set
13. Returns the next input token as the indicated type.
constants
assignment
delimiters
byte nextByte( )
14. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
int length( )
Random ( )
support methods
static
15. 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.
mutator method
String concat (String str)
enumerated type
signed
16. An explicit data value used in a program
String substring (int offset - int endIndex)
literal
string literal
tokens
17. 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
initialize
instance variable
encapsulation
a constructor
18. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
int length( )
String nextLine( )
self-governing
instance variable
19. 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 substring (int offset - int endIndex)
parameter list
service methods
20. A ________________ is immutable.
import java.util*
String object
inheritance
boolean equals (String str)
21. Every object has two things: a state and a _____ of behaviors
boolean hasNext( )
int compareTo (String str)
set
NumberFormat class
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.
a constructor
int compareTo (String str)
encapsulation
called method
23. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
import java.util*
String substring (int offset - int endIndex)
constructors
Scanner useDelimiter(String pattern)
24. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
have void
instance data
primitive variables
instance variable
25. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
a constructor
assignment statement
parameter
26. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
header of a method
local data
boolean equalsIgnoreCase (String str)
27. Constructor: creates a new string object with the same characters as str.
byte to short
String (String str)
String findInLine (String pattern)
behaviors of an object
28. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
Random class
the "import" declaration
not possible
method
29. All wrapper classes are defined in ___________
have void
java.lang package
num=Integer.parseInt(str);
instantiation
30. 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.
parameter list
string name;
String object
delimiters
31. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
assignment conversion
String substring (int offset - int endIndex)
char charAt (int index)
32. Before you use a variable __________it
String (String str)
initialize
the "import" declaration
encapsulation
33. A value that is passed into a method when it is invoked
constructors
expression
parameter
assignment
34. Elements of input
promotion
tokens
java.lang package
dot operator
35. Also called a selection statement b/c it allows us to choose which statement will be executed next.
java.lang package
String next( )
conditional statement
String toLowerCase ( )
36. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
RH
variable
string literal
state of an object
37. 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
parentheses
inheritance
System.out.println
a constructor
38. Returns a string containing the specified number formatted according to this object's pattern.
boolean equals (String str)
boolean hasNext( )
String format (double number)
packages
39. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
have void
String replace (char oldChar - char newChar)
class
accessor method
40. ++count; -- count
the "import" declaration
prefix form
Random class
String format (double number)
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
String nextLine( )
formal parameters
aliases
polymorphism
42. A set of classes that supports the development of programs
class library
boolean nextBoolean( )
long
escape sequences
43. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
variable declaration
postfix form
data values
44. This declaration creates a Scanner object that reads input from the keyboard
encapsulation
the DecimalFormat class
Scanner scan=new Scanner (System.in);
boolean value
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
boolean value
constructors
character string
set
46. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
long
java.lang package
boolean hasNext( )
method
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
set
assignment conversion
char charAt (int index)
48. Constants are ______ because the can't be changed once you use the final modifier
public
Random class
assignment statement
string name;
49. 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
String object
promotion
int compareTo (String str)
50. 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.
prefix form
visibility modifiers
Scanner class
int length( )