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. 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
import java.util*
long
encapsulation of an object
state of an object
2. ____________ is instantiated in the traditional way using the new operator.
the DecimalFormat class
boolean equalsIgnoreCase (String str)
double
scope
3. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
double
variable name
floating point numbers
the "import" declaration
4. sides=10;
class library
aliases
assignment statement
signed
5. The act of creating an object using the "new" operator
character literal
delimiters
static
instantiation
6. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
int length( )
String object
called method
7. Returns the next input token as a character string.
constructors
character string
System.out.println
String next( )
8. Before you use a variable __________it
arithmetic
initialize
Random ( )
local data
9. 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 -
operations
class
scope
not possible
10. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
int length( )
state of an object
not possible
assignment conversion
11. 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.
private
scope
String replace (char oldChar - char newChar)
encapsulation
12. Returns the next input token as the indicated type.
static int parseInt (String str)
initialize
boolean nextBoolean( )
NumberFormat class
13. Represents either a primitive value or an object
tokens
variable name
packages
enumerated type
14. When a variable is declared inside a method
int length( )
local data
variable name
character literal
15. Four integer data types: byte - short - int - _____
long
parameter
polymorphism
class
16. The values passed into a method in an invocation; these are called the arguments to the method
local data
behaviors of an object
boolean equalsIgnoreCase (String str)
actual parameters
17. Variables and constants can be referenced in any method of the class by declaring at the _________
scope
higher
class level
int length( )
18. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
import java.util*
data values
polymorphism
string literal
19. 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
wrapper class
class
initialize
String nextLine( )
20. Begins with a backslash character ""
escape sequences
arithmetic
assignment conversion
formal parameters
21. Constructors do not even _______; therefore they cannot return a value.
RH
have void
prefix form
variable declaration
22. Cast operator has _________ precedence to division
flow of control
a constructor
higher
String substring (int offset - int endIndex)
23. 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
public
Scanner scan=new Scanner (System.in);
underscores
aliases
24. An explicit data value used in a program
literal
floating point numbers
num=Integer.parseInt(str);
expression
25. A value that is passed into a method when it is invoked
method invocation
inheritance
parameter
Scanner scan=new Scanner (System.in);
26. The declarations of object variables have a similar structure to the declaration of _______________
public
encapsulation of an object
primitive variables
arithmetic
27. Expressed in a Java program with single quotes
character literal
null
signed
parameter
28. A method that returns a value must have a _________
int length( )
return statement
String nextLine( )
byte to short
29. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
System.out.println
java.lang package
String nextLine( )
tokens
30. Attempts to find the next occurence of the specified pattern - ignoring delimiters
the "import" declaration
String findInLine (String pattern)
java.util class libary
underscores
31. 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
actual parameters
inheritance
delimiters
32. A set of classes that supports the development of programs
public
java.util class libary
class library
assignment conversion
33. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
String replace (char oldChar - char newChar)
postfix form
string literal
floating point numbers
34. White space characters such as space characters - tabs - and new lines that separate the elements of input
variable name
String substring (int offset - int endIndex)
delimiters
String format (double number)
35. 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
variable
Understanding
a constructor
string literal
36. 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
postfix form
behaviors of an object
pointer
parameter
37. Boolean type conversions are ___________
enumerated type
not possible
class level
postfix form
38. Returns all input remaining on the current line as a character string.
String format (double number)
delimiters
String nextLine( )
casting
39. 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
a constructor
visibility modifiers
double
Scanner class
40. The one that is invoked
conditional statement
postfix form
called method
polymorphism
41. Three ways in which Java conversions occur: _________ conversion - promotion - casting
byte to short
private
assignment
conditional statement
42. Returns a new string consisting of this string concatenated with str.
parameter
String concat (String str)
assignment conversion
Random class
43. This declaration creates a Scanner object that reads input from the keyboard
System.out.println
return statement
Scanner scan=new Scanner (System.in);
String (String str)
44. 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
variable
parameter list
String toUpperCase ( )
45. Also called a selection statement b/c it allows us to choose which statement will be executed next.
autoboxing
declared
parameter
conditional statement
46. 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 findInLine (String pattern)
java.util class libary
instance data
47. 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.
reserved word void
visibility modifiers
expression
RH
48. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
parameter
accessor method
String toLowerCase ( )
String replace (char oldChar - char newChar)
49. Widening byte: _________ - to int - to long - to float - to double
boolean equals (String str)
byte to short
java.lang package
behaviors of an object
50. format for constants: all upper-case; separated by ________
attributes of an object
underscores
method declaration
mutator method
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