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. 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.
instance data
set
floating point numbers
assignment conversion
2. Changes a particular value - e.g.setX - where X is the value they are setting.
dot operator
mutator method
RH
reserved word void
3. 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;
assignment
boolean equalsIgnoreCase (String str)
variable name
4. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
encapsulation
reference
java.lang package
formal parameters
5. Cast operator has _________ precedence to division
boolean equalsIgnoreCase (String str)
character literal
higher
Scanner class
6. Returns the next input token as the indicated type.
public
Scanner class
conditionals
byte nextByte( )
7. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
public
conditional statement
local data
8. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
variable name
String replace (char oldChar - char newChar)
instance data
null
9. 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.
promotion
polymorphism
static int parseInt (String str)
method declaration
10. Returns a new string consisting of this string concatenated with str.
String concat (String str)
String toUpperCase ( )
support methods
Scanner scan=new Scanner (System.in);
11. We use an object when we have a _________ to it
Scanner class
reference
int compareTo (String str)
called method
12. _____ expression evaluated first
private
RH
java.lang package
encapsulation
13. 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.
character literal
the DecimalFormat class
assignment statement
scope
14. A name for a location in memory used to hold a data value.
variable
parameter
promotion
static
15. Constants are ______ because the can't be changed once you use the final modifier
class level
public
String next( )
java.lang package
16. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
method invocation
formal parameters
int compareTo (String str)
class level
17. Modifier>type/void>identifier>parameters>method body
method declaration
return statement
String format (double number)
String concat (String str)
18. They clarify the role a certain number has in the program.
visibility modifiers
instance data
constants
method declaration
19. 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
Random ( )
parameter list
casting
double
20. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
String next( )
mutator method
initialize
21. 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
have void
String format (double number)
double
22. Count++; count--
null
double
Random ( )
postfix form
23. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
assignment conversion
instance variable
String nextLine( )
aliases
24. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
class
polymorphism
import java.util*
scope
25. A variable that refers to an object must be __________
declared
byte nextByte( )
variable
NumberFormat class
26. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
Scanner useDelimiter(String pattern)
parameter list
constructors
set
27. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
conditionals
parentheses
assignment statement
String concat (String str)
28. 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.
escape sequences
parentheses
java.lang package
enumerated type
29. Returns the character at the specified index.
operations
char charAt (int index)
instantiation
delimiters
30. Expressed in a Java program with single quotes
character literal
Random ( )
int compareTo (String str)
instance variable
31. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
promotion
String format (double number)
String next( )
actual parameters
32. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
postfix form
prefix form
return statement
33. Returns a new string consisting of this string concatenated with str.
boolean equals (String str)
method
java.util class libary
character literal
34. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
Random class
String object
System.out.println
Understanding
35. A method that returns a value must have a _________
return statement
reference
operations
inheritance
36. A class usually provides services to access and modify __________
character string
data values
a constructor
string name;
37. Attempts to find the next occurence of the specified pattern - ignoring delimiters
long
String findInLine (String pattern)
variable name
Scanner useDelimiter(String pattern)
38. Returns true if the scanner has anotehr token in its input.
escape sequences
arithmetic
boolean hasNext( )
boolean value
39. Returns the int corresponding to the value stored in the specified string
data values
static int parseInt (String str)
support methods
initialize
40. 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 -
dot operator
instantiation
class
called method
41. Returns the number of characters in this stirng.
constants
Scanner useDelimiter(String pattern)
reserved word void
int length( )
42. The declarations of object variables have a similar structure to the declaration of _______________
literal
primitive variables
set
import java.util*
43. Every object has two things: a state and a _____ of behaviors
mutator method
inheritance
set
header of a method
44. 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
class
inheritance
actual parameters
the DecimalFormat class
45. Variables that don't contain any data
string name;
uninitialized variables
visibility modifiers
character literal
46. After an object has been instantiated - we set the _________ to access its methods
autoboxing
int compareTo (String str)
dot operator
encapsulation of an object
47. Returns a string containing the specified number formatted according to this object's pattern.
String format (double number)
class level
character string
prefix form
48. 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
String replace (char oldChar - char newChar)
public
method invocation
data values
49. A value that is passed into a method when it is invoked
parameter
java.lang package
char charAt (int index)
self-governing
50. New memory space is reserved for that variable every time an instance of the class that is created.
autoboxing
instance data
conditionals
support methods
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