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. Variables and constants can be referenced in any method of the class by declaring at the _________
boolean nextBoolean( )
class level
byte to short
reference
2. Expressed in a Java program with single quotes
support methods
character literal
Understanding
NumberFormat class
3. Widening byte: _________ - to int - to long - to float - to double
byte to short
the "import" declaration
local data
support methods
4. The declarations of object variables have a similar structure to the declaration of _______________
double
expression
primitive variables
int length( )
5. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
method invocation
operations
NumberFormat class
boolean equals (String str)
6. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
class
method
class library
7. 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.
static int parseInt (String str)
parameter list
encapsulation of an object
a constructor
8. Variables that don't contain any data
java.util class libary
actual parameters
uninitialized variables
Random class
9. 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
import java.util*
byte nextByte( )
aliases
assignment
10. 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
primitive variables
String format (double number)
literal
11. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String substring (int offset - int endIndex)
String findInLine (String pattern)
String format (double number)
String next( )
12. 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
variable
character string
Scanner class
have void
13. 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
autoboxing
constructors
casting
14. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
uninitialized variables
accessor method
arithmetic
15. Delimited by double quotation characters
encapsulation
byte nextByte( )
conditionals
string literal
16. New memory space is reserved for that variable every time an instance of the class that is created.
a constructor
boolean value
String toUpperCase ( )
instance data
17. 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
flow of control
literal
reserved word void
encapsulation of an object
18. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
parameter list
return statement
local data
19. Attempts to find the next occurence of the specified pattern - ignoring delimiters
method
String findInLine (String pattern)
constants
the "import" declaration
20. Methods in the Math class are ______
Scanner useDelimiter(String pattern)
String object
expression
static
21. ++count; -- count
operations
int compareTo (String str)
actual parameters
prefix form
22. An object in Java - defined by the class String
expression
character string
formal parameters
packages
23. 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
String toLowerCase ( )
formal parameters
variable declaration
packages
24. Constants are ______ because the can't be changed once you use the final modifier
public
String replace (char oldChar - char newChar)
Scanner class
data values
25. sides=10;
String substring (int offset - int endIndex)
long
encapsulation
assignment statement
26. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
service methods
escape sequences
actual parameters
static
27. 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.
postfix form
class
reserved word void
declared
28. The classes of the Java standard class library are grouped into __________.
state of an object
signed
method invocation
packages
29. All wrapper classes are defined in ___________
higher
RH
java.lang package
instantiation
30. 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 -
String toLowerCase ( )
class
wrapper class
casting
31. The Scanner class is part of ___________________
java.util class libary
import java.util*
expression
boolean nextBoolean( )
32. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
constants
the "import" declaration
parameter list
static int parseInt (String str)
33. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
instance data
boolean equals (String str)
String toLowerCase ( )
34. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
RH
null
boolean equals (String str)
35. Four integer data types: byte - short - int - _____
Random class
long
support methods
arithmetic
36. Constructor: creates a new string object with the same characters as str.
String (String str)
String substring (int offset - int endIndex)
boolean equalsIgnoreCase (String str)
literal
37. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
parentheses
enumerated type
Scanner scan=new Scanner (System.in);
accessor method
38. ______________ operators have higher precedence
reserved word void
arithmetic
character literal
Random ( )
39. _____ expression evaluated first
RH
reserved word void
method
instance data
40. 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
mutator method
static
constructors
casting
41. Each piece of data that we send to a method
encapsulation of an object
parameter
promotion
class library
42. 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
expression
String object
casting
boolean value
43. The act of creating an object using the "new" operator
instantiation
character literal
java.util class libary
state of an object
44. Part of the java.util class; picks a number at random out of a range of values.
Random class
called method
parameter
header of a method
45. 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.
flow of control
called method
state of an object
assignment conversion
46. We use an object when we have a _________ to it
reference
public
have void
not possible
47. Returns a new string consisting of this string concatenated with str.
data values
attributes of an object
service methods
boolean equals (String str)
48. Before you use a variable __________it
character literal
parameter
initialize
string literal
49. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
literal
System.out.println
delimiters
instance variable
50. Returns the number of characters in this stirng.
arithmetic
autoboxing
scope
int length( )
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