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. 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 equals (String str)
attributes of an object
service methods
2. A set of classes that supports the development of programs
class library
public
encapsulation of an object
Random ( )
3. An object in Java - defined by the class String
character string
string literal
arithmetic
null
4. ____________ is instantiated in the traditional way using the new operator.
uninitialized variables
class library
the DecimalFormat class
String substring (int offset - int endIndex)
5. A method that returns a value must have a _________
static int parseInt (String str)
instance data
return statement
underscores
6. A value that is passed into a method when it is invoked
parameter
dot operator
set
string literal
7. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
Understanding
the "import" declaration
int length( )
byte nextByte( )
8. When a variable is declared inside a method
instance data
boolean value
local data
declared
9. Each piece of data that we send to a method
null
assignment conversion
service methods
parameter
10. Also called a selection statement b/c it allows us to choose which statement will be executed next.
static int parseInt (String str)
System.out.println
conditional statement
String nextLine( )
11. 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.
int length( )
reserved word void
System.out.println
conditionals
12. Returns a string containing the specified number formatted according to this object's pattern.
the DecimalFormat class
dot operator
String format (double number)
prefix form
13. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
encapsulation
formal parameters
behaviors of an object
14. 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
the "import" declaration
encapsulation of an object
packages
local data
15. 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.
flow of control
scope
behaviors of an object
public
16. An object has behaviors - which are defined by the ________ associated with that object.
flow of control
the DecimalFormat class
operations
local data
17. _____ expression evaluated first
character literal
instantiation
RH
enumerated type
18. 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.
int compareTo (String str)
Random ( )
encapsulation
floating point numbers
19. Every object has two things: a state and a _____ of behaviors
set
java.lang package
variable
string name;
20. sides=10;
string literal
String replace (char oldChar - char newChar)
assignment statement
java.util class libary
21. Before you use a variable __________it
initialize
byte to short
packages
floating point numbers
22. Returns the next input token as a character string.
boolean hasNext( )
String next( )
signed
arithmetic
23. Two categories of statements that control the flow of executing through a method: __________ and loops
inheritance
RH
variable declaration
conditionals
24. The classes of the Java standard class library are grouped into __________.
long
packages
character string
variable
25. The values passed into a method in an invocation; these are called the arguments to the method
actual parameters
assignment conversion
parameter
accessor method
26. 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
method
delimiters
escape sequences
Scanner scan=new Scanner (System.in);
27. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
reference
aliases
String format (double number)
28. Declared in a class but not inside any particular method
variable
initialize
instance data
parameter list
29. Four integer data types: byte - short - int - _____
boolean equalsIgnoreCase (String str)
long
encapsulation of an object
enumerated type
30. Elements of input
character literal
boolean equalsIgnoreCase (String str)
boolean equals (String str)
tokens
31. The names of the parameters in the header of the method declaration
formal parameters
NumberFormat class
byte to short
import java.util*
32. Variables and constants can be referenced in any method of the class by declaring at the _________
constants
prefix form
instance variable
class level
33. Widening byte: _________ - to int - to long - to float - to double
parameter list
parameter
java.util class libary
byte to short
34. Expressed in a Java program with single quotes
string name;
character literal
method invocation
reserved word void
35. They clarify the role a certain number has in the program.
accessor method
constants
arithmetic
encapsulation
36. All wrapper classes are defined in ___________
Understanding
java.lang package
byte to short
scope
37. A variable that refers to an object must be __________
Random ( )
declared
boolean equalsIgnoreCase (String str)
conditional statement
38. 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
static int parseInt (String str)
a constructor
promotion
Understanding
39. ++count; -- count
accessor method
variable name
autoboxing
prefix form
40. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
the "import" declaration
self-governing
operations
parentheses
41. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
String substring (int offset - int endIndex)
java.util class libary
postfix form
42. Boolean type conversions are ___________
support methods
String substring (int offset - int endIndex)
encapsulation of an object
not possible
43. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
assignment conversion
assignment
String toLowerCase ( )
java.lang package
44. 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
enumerated type
method invocation
class library
public
45. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
NumberFormat class
autoboxing
parentheses
char charAt (int index)
46. 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
System.out.println
string name;
attributes of an object
polymorphism
47. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
support methods
attributes of an object
state of an object
static int parseInt (String str)
48. 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
actual parameters
inheritance
conditional statement
assignment statement
49. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
have void
constructors
String (String str)
Random class
50. After an object has been instantiated - we set the _________ to access its methods
character literal
visibility modifiers
dot operator
behaviors of an object
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