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. Constants are ______ because the can't be changed once you use the final modifier
java.util class libary
String replace (char oldChar - char newChar)
formal parameters
public
2. Instance data should be defined with what________ visibility
method
private
boolean hasNext( )
conditional statement
3. Sets the scanner's delimiting pattern.
local data
java.lang package
Scanner useDelimiter(String pattern)
variable name
4. The one that is invoked
casting
method
null
called method
5. Returns a string containing the specified number formatted according to this object's pattern.
set
String format (double number)
Scanner useDelimiter(String pattern)
escape sequences
6. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
reserved word void
int compareTo (String str)
assignment statement
instance variable
7. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
Scanner useDelimiter(String pattern)
String concat (String str)
String toLowerCase ( )
8. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object
operations
string name;
uninitialized variables
literal
9. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
declared
String (String str)
conditional statement
10. A set of classes that supports the development of programs
mutator method
uninitialized variables
class library
string literal
11. Boolean type conversions are ___________
enumerated type
not possible
scope
num=Integer.parseInt(str);
12. A null reference indicates that a variable does not refer to an object
inheritance
String findInLine (String pattern)
null
String replace (char oldChar - char newChar)
13. The Scanner class is part of ___________________
static int parseInt (String str)
java.util class libary
uninitialized variables
parameter
14. Variables that don't contain any data
packages
mutator method
uninitialized variables
declared
15. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
wrapper class
parentheses
assignment conversion
boolean value
16. Returns the character at the specified index.
class level
char charAt (int index)
static
boolean equalsIgnoreCase (String str)
17. 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
arithmetic
called method
method
packages
18. The location at which a variable is declared defines its scope - which is the area within a program in which the variable can be referenced.
scope
class
inheritance
constants
19. White space characters such as space characters - tabs - and new lines that separate the elements of input
long
delimiters
reference
the "import" declaration
20. Part of the java.util class; picks a number at random out of a range of values.
java.util class libary
Random class
data values
Understanding
21. They clarify the role a certain number has in the program.
int length( )
signed
Understanding
constants
22. Begins with a backslash character ""
variable declaration
class level
long
escape sequences
23. Expressed in a Java program with single quotes
boolean nextBoolean( )
character literal
declared
behaviors of an object
24. Constructor: creates a new string object with the same characters as str.
String concat (String str)
underscores
String (String str)
string literal
25. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
prefix form
instance data
java.lang package
26. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
class level
method declaration
Scanner scan=new Scanner (System.in);
27. Elements of input
casting
assignment
tokens
instance data
28. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
flow of control
formal parameters
wrapper class
29. 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
casting
header of a method
boolean equalsIgnoreCase (String str)
wrapper class
30. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
character literal
state of an object
encapsulation
mutator method
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
expression
boolean nextBoolean( )
public
import java.util*
32. Count++; count--
postfix form
static int parseInt (String str)
pointer
underscores
33. 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
Random ( )
char charAt (int index)
inheritance
packages
34. A class usually provides services to access and modify __________
have void
data values
Scanner class
Random class
35. A ________________ is immutable.
num=Integer.parseInt(str);
String object
assignment conversion
boolean value
36. 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
primitive variables
long
casting
dot operator
37. 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
attributes of an object
declared
variable declaration
called method
38. Attempts to find the next occurence of the specified pattern - ignoring delimiters
System.out.println
autoboxing
String findInLine (String pattern)
initialize
39. All numeric types are _______ - meaning both positive and negative values can be stored in them
character literal
assignment statement
signed
Scanner class
40. Before you use a variable __________it
String object
string name;
initialize
instance data
41. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
primitive variables
initialize
service methods
assignment
42. 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
set
System.out.println
inheritance
polymorphism
43. Four integer data types: byte - short - int - _____
long
boolean value
byte to short
instance data
44. A variable that refers to an object must be __________
wrapper class
variable name
uninitialized variables
declared
45. The classes of the Java standard class library are grouped into __________.
char charAt (int index)
parameter list
packages
int length( )
46. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
pointer
String replace (char oldChar - char newChar)
String next( )
initialize
47. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
behaviors of an object
null
self-governing
delimiters
48. sides=10;
String substring (int offset - int endIndex)
local data
have void
assignment statement
49. _____ expression evaluated first
parameter
RH
method invocation
Understanding
50. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
actual parameters
instantiation
behaviors of an object
support methods