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. _____ expression evaluated first
RH
Random ( )
flow of control
aliases
2. Widening byte: _________ - to int - to long - to float - to double
private
delimiters
byte to short
aliases
3. Returns the next input token as the indicated type.
primitive variables
byte nextByte( )
uninitialized variables
reference
4. 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
byte to short
higher
wrapper class
promotion
5. Two categories of statements that control the flow of executing through a method: __________ and loops
aliases
conditionals
Random class
reserved word void
6. 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
polymorphism
assignment conversion
instance variable
Understanding
7. A null reference indicates that a variable does not refer to an object
encapsulation
char charAt (int index)
null
instantiation
8. The declarations of object variables have a similar structure to the declaration of _______________
primitive variables
Scanner class
Scanner scan=new Scanner (System.in);
tokens
9. Modifier>type/void>identifier>parameters>method body
primitive variables
java.lang package
dot operator
method declaration
10. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
literal
tokens
import java.util*
11. ____________ is instantiated in the traditional way using the new operator.
boolean nextBoolean( )
primitive variables
the DecimalFormat class
constants
12. Constants are ______ because the can't be changed once you use the final modifier
public
pointer
tokens
return statement
13. Every object has two things: a state and a _____ of behaviors
formal parameters
method invocation
static int parseInt (String str)
set
14. 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
constants
java.util class libary
String object
attributes of an object
15. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
escape sequences
static
double
16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
parameter
service methods
self-governing
method
17. We use an object when we have a _________ to it
reference
boolean equals (String str)
declared
reserved word void
18. Variables and constants can be referenced in any method of the class by declaring at the _________
enumerated type
attributes of an object
class level
actual parameters
19. The classes of the Java standard class library are grouped into __________.
String format (double number)
literal
packages
floating point numbers
20. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
service methods
instantiation
Scanner scan=new Scanner (System.in);
support methods
21. 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
return statement
have void
Scanner class
Scanner scan=new Scanner (System.in);
22. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
Understanding
string literal
parameter
23. Two floating data types: float - _______
import java.util*
double
pointer
self-governing
24. Delimited by double quotation characters
assignment conversion
instance variable
string literal
class library
25. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held
the "import" declaration
String object
pointer
character literal
26. 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.
visibility modifiers
local data
parameter
conditional statement
27. Returns all input remaining on the current line as a character string.
String nextLine( )
reference
the DecimalFormat class
literal
28. Cast operator has _________ precedence to division
higher
scope
variable declaration
System.out.println
29. A method that returns a value must have a _________
return statement
num=Integer.parseInt(str);
expression
polymorphism
30. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
string literal
instance data
delimiters
String toUpperCase ( )
31. The Scanner class is part of ___________________
initialize
byte nextByte( )
java.util class libary
Random ( )
32. All numeric types are _______ - meaning both positive and negative values can be stored in them
signed
the "import" declaration
string literal
java.lang package
33. Returns the int corresponding to the value stored in the specified string
String substring (int offset - int endIndex)
static int parseInt (String str)
java.lang package
variable
34. 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
delimiters
method invocation
instance data
String next( )
35. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
reserved word void
encapsulation
instance data
36. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
autoboxing
string literal
encapsulation of an object
local data
37. 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);
set
class level
a constructor
38. A class usually provides services to access and modify __________
literal
operations
delimiters
data values
39. Instructs the compiler to reserve a portion of main memory space large enough to hold a particular type of value and indicates the name by which we refer to that location
variable declaration
assignment
int length( )
conditionals
40. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
data values
variable name
aliases
41. 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
tokens
import java.util*
NumberFormat class
string name;
42. Instance data should be defined with what________ visibility
int length( )
return statement
private
enumerated type
43. 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
polymorphism
boolean equalsIgnoreCase (String str)
a constructor
assignment conversion
44. An object in Java - defined by the class String
floating point numbers
character string
parameter
have void
45. 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
formal parameters
inheritance
instance data
parameter list
46. A set of classes that supports the development of programs
constants
actual parameters
class library
attributes of an object
47. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
instance variable
byte nextByte( )
parameter
48. 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
Understanding
inheritance
boolean value
String substring (int offset - int endIndex)
49. A ________________ is immutable.
static int parseInt (String str)
reserved word void
String object
assignment
50. ++count; -- count
prefix form
char charAt (int index)
enumerated type
return statement
Sorry!:) No result found.
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