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. 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:
int length( )
String format (double number)
String object
num=Integer.parseInt(str);
2. A method that returns a value must have a _________
parameter
instance data
return statement
service methods
3. Represents either a primitive value or an object
variable name
not possible
String findInLine (String pattern)
parentheses
4. _____ expression evaluated first
promotion
reference
RH
boolean nextBoolean( )
5. Three ways in which Java conversions occur: _________ conversion - promotion - casting
local data
promotion
int length( )
assignment
6. New memory space is reserved for that variable every time an instance of the class that is created.
inheritance
conditionals
boolean value
instance data
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.
class
byte nextByte( )
variable declaration
the "import" declaration
8. 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.
class level
variable
java.lang package
scope
9. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
boolean equalsIgnoreCase (String str)
service methods
behaviors of an object
10. 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
byte nextByte( )
support methods
String format (double number)
System.out.println
11. A ________________ is immutable.
String object
self-governing
polymorphism
instance data
12. They clarify the role a certain number has in the program.
String substring (int offset - int endIndex)
byte to short
parameter
constants
13. Each piece of data that we send to a method
variable
variable name
parameter
num=Integer.parseInt(str);
14. 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
initialize
int length( )
self-governing
15. Returns the character at the specified index.
char charAt (int index)
Understanding
java.lang package
String format (double number)
16. 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.
String replace (char oldChar - char newChar)
enumerated type
return statement
initialize
17. This declaration creates a Scanner object that reads input from the keyboard
the DecimalFormat class
Scanner scan=new Scanner (System.in);
tokens
variable declaration
18. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
instantiation
double
RH
String toLowerCase ( )
19. Boolean type conversions are ___________
not possible
double
constants
variable name
20. Delimited by double quotation characters
parentheses
conditional statement
double
string literal
21. An explicit data value used in a program
NumberFormat class
parameter
literal
header of a method
22. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
class library
String substring (int offset - int endIndex)
enumerated type
the "import" declaration
23. The one that is invoked
actual parameters
char charAt (int index)
called method
Scanner useDelimiter(String pattern)
24. Sets the scanner's delimiting pattern.
operations
class
casting
Scanner useDelimiter(String pattern)
25. ______________ operators have higher precedence
the DecimalFormat class
arithmetic
String toLowerCase ( )
constructors
26. A class usually provides services to access and modify __________
data values
accessor method
System.out.println
constants
27. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
Random ( )
String toUpperCase ( )
int compareTo (String str)
conditionals
28. An object in Java - defined by the class String
int length( )
character string
wrapper class
class level
29. Widening byte: _________ - to int - to long - to float - to double
prefix form
string name;
support methods
byte to short
30. 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 nextBoolean( )
Scanner scan=new Scanner (System.in);
RH
31. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
constructors
mutator method
String concat (String str)
service methods
32. Returns the int corresponding to the value stored in the specified string
postfix form
static int parseInt (String str)
aliases
Understanding
33. Begins with a backslash character ""
escape sequences
assignment statement
char charAt (int index)
data values
34. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
num=Integer.parseInt(str);
boolean hasNext( )
NumberFormat class
long
35. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
variable declaration
parameter list
assignment statement
36. The order in which statements are executed in a running program
state of an object
public
flow of control
class library
37. ++count; -- count
parameter
num=Integer.parseInt(str);
prefix form
Random ( )
38. 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
support methods
promotion
constants
wrapper class
39. 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
boolean value
packages
the DecimalFormat class
instance variable
40. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
encapsulation of an object
conditional statement
String format (double number)
parentheses
41. Constructor: creates a new string object with the same characters as str.
visibility modifiers
assignment conversion
primitive variables
String (String str)
42. After an object has been instantiated - we set the _________ to access its methods
declared
wrapper class
dot operator
postfix form
43. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
NumberFormat class
character string
long
44. 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
num=Integer.parseInt(str);
attributes of an object
variable
String toLowerCase ( )
45. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
behaviors of an object
String (String str)
encapsulation of an object
46. 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
postfix form
encapsulation of an object
java.util class libary
class library
47. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
java.lang package
packages
support methods
Random ( )
48. Two floating data types: float - _______
operations
double
string literal
boolean value
49. A variable that refers to an object must be __________
byte to short
dot operator
declared
constructors
50. 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.
java.lang package
java.lang package
class library
visibility modifiers
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