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 that is identical with this string except that every occurrence of oldChar is replaed by newChar
System.out.println
String replace (char oldChar - char newChar)
Random ( )
the DecimalFormat class
2. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
arithmetic
self-governing
header of a method
NumberFormat class
3. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
behaviors of an object
called method
enumerated type
4. A value that is passed into a method when it is invoked
parameter
parameter list
String format (double number)
primitive variables
5. 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.
service methods
encapsulation
assignment
Scanner class
6. 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
num=Integer.parseInt(str);
instance data
conditionals
7. ++count; -- count
delimiters
prefix form
self-governing
scope
8. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
the "import" declaration
accessor method
called method
expression
9. Returns all input remaining on the current line as a character string.
escape sequences
Random ( )
Scanner useDelimiter(String pattern)
String nextLine( )
10. Declared in a class but not inside any particular method
instance data
null
String concat (String str)
reference
11. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment statement
assignment
header of a method
Random class
12. Constructor: creates a new pseudorandom number generator.
Random ( )
encapsulation
service methods
Scanner useDelimiter(String pattern)
13. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.
initialize
encapsulation
method declaration
reserved word void
14. Returns true if the scanner has anotehr token in its input.
encapsulation of an object
uninitialized variables
parameter
boolean hasNext( )
15. 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);
conditionals
initialize
boolean equalsIgnoreCase (String str)
16. Delimited by double quotation characters
parameter
char charAt (int index)
actual parameters
string literal
17. Constructors do not even _______; therefore they cannot return a value.
tokens
boolean nextBoolean( )
string name;
have void
18. The one that is invoked
String substring (int offset - int endIndex)
called method
reserved word void
String nextLine( )
19. Sets the scanner's delimiting pattern.
long
String findInLine (String pattern)
Scanner useDelimiter(String pattern)
aliases
20. Modifier>type/void>identifier>parameters>method body
parameter list
byte nextByte( )
method
method declaration
21. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
autoboxing
variable name
escape sequences
constructors
22. White space characters such as space characters - tabs - and new lines that separate the elements of input
local data
variable
encapsulation of an object
delimiters
23. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
promotion
operations
wrapper class
String substring (int offset - int endIndex)
24. All wrapper classes are defined in ___________
parameter list
parameter
java.util class libary
java.lang package
25. 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
string name;
variable declaration
assignment statement
polymorphism
26. A null reference indicates that a variable does not refer to an object
null
String next( )
floating point numbers
Scanner useDelimiter(String pattern)
27. Represents either a primitive value or an object
state of an object
variable name
variable declaration
character string
28. Variables and constants can be referenced in any method of the class by declaring at the _________
String toUpperCase ( )
have void
set
class level
29. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
service methods
initialize
java.util class libary
30. When a variable is declared inside a method
Random ( )
local data
operations
String toLowerCase ( )
31. All numeric types are _______ - meaning both positive and negative values can be stored in them
java.lang package
signed
assignment
autoboxing
32. Constants are ______ because the can't be changed once you use the final modifier
int length( )
num=Integer.parseInt(str);
public
scope
33. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
long
byte to short
self-governing
boolean equals (String str)
34. Changes a particular value - e.g.setX - where X is the value they are setting.
Scanner class
enumerated type
conditional statement
mutator method
35. Methods in the Math class are ______
assignment statement
java.lang package
static
expression
36. sides=10;
self-governing
assignment statement
instance data
encapsulation
37. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
encapsulation of an object
String format (double number)
assignment conversion
promotion
38. Returns the number of characters in this stirng.
variable name
byte to short
state of an object
int length( )
39. The classes of the Java standard class library are grouped into __________.
packages
service methods
escape sequences
variable declaration
40. Each piece of data that we send to a method
char charAt (int index)
import java.util*
autoboxing
parameter
41. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
inheritance
support methods
boolean equals (String str)
literal
42. Returns the next input token as a character string.
String next( )
autoboxing
String object
operations
43. 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
String replace (char oldChar - char newChar)
support methods
assignment statement
casting
44. Returns the next input token as the indicated type.
dot operator
assignment
boolean nextBoolean( )
header of a method
45. 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
constructors
System.out.println
Random class
String next( )
46. 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
method
method invocation
String toLowerCase ( )
delimiters
47. Instance data should be defined with what________ visibility
null
Scanner scan=new Scanner (System.in);
private
set
48. A name for a location in memory used to hold a data value.
variable
String toUpperCase ( )
instance data
character string
49. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
null
class library
boolean hasNext( )
import java.util*
50. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
conditionals
String (String str)
byte nextByte( )
Can you answer 50 questions in 15 minutes?
Let me suggest you:
Browse all subjects
Browse all tests
Most popular tests
Major Subjects
Tests & Exams
AP
CLEP
DSST
GRE
SAT
GMAT
Certifications
CISSP go to https://www.isc2.org/
PMP
ITIL
RHCE
MCTS
More...
IT Skills
Android Programming
Data Modeling
Objective C Programming
Basic Python Programming
Adobe Illustrator
More...
Business Skills
Advertising Techniques
Business Accounting Basics
Business Strategy
Human Resource Management
Marketing Basics
More...
Soft Skills
Body Language
People Skills
Public Speaking
Persuasion
Job Hunting And Resumes
More...
Vocabulary
GRE Vocab
SAT Vocab
TOEFL Essential Vocab
Basic English Words For All
Global Words You Should Know
Business English
More...
Languages
AP German Vocab
AP Latin Vocab
SAT Subject Test: French
Italian Survival
Norwegian Survival
More...
Engineering
Audio Engineering
Computer Science Engineering
Aerospace Engineering
Chemical Engineering
Structural Engineering
More...
Health Sciences
Basic Nursing Skills
Health Science Language Fundamentals
Veterinary Technology Medical Language
Cardiology
Clinical Surgery
More...
English
Grammar Fundamentals
Literary And Rhetorical Vocab
Elements Of Style Vocab
Introduction To English Major
Complete Advanced Sentences
Literature
Homonyms
More...
Math
Algebra Formulas
Basic Arithmetic: Measurements
Metric Conversions
Geometric Properties
Important Math Facts
Number Sense Vocab
Business Math
More...
Other Major Subjects
Science
Economics
History
Law
Performing-arts
Cooking
Logic & Reasoning
Trivia
Browse all subjects
Browse all tests
Most popular tests