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. 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.
assignment conversion
Random class
character literal
the "import" declaration
2. 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
method declaration
a constructor
visibility modifiers
Scanner scan=new Scanner (System.in);
3. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
class level
char charAt (int index)
String nextLine( )
floating point numbers
4. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
int compareTo (String str)
the DecimalFormat class
parentheses
initialize
5. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
visibility modifiers
byte to short
String object
6. A variable that refers to an object must be __________
support methods
the DecimalFormat class
declared
method invocation
7. 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
conditional statement
character string
method
visibility modifiers
8. Declared in a class but not inside any particular method
instance data
actual parameters
String replace (char oldChar - char newChar)
class library
9. Expressed in a Java program with single quotes
num=Integer.parseInt(str);
arithmetic
Understanding
character literal
10. ______________ operators have higher precedence
String concat (String str)
String toLowerCase ( )
arithmetic
reserved word void
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.
null
reserved word void
String format (double number)
class level
12. 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
static int parseInt (String str)
local data
self-governing
13. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
instance data
higher
delimiters
14. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
variable declaration
uninitialized variables
method
instance variable
15. Constructor: creates a new string object with the same characters as str.
java.lang package
parameter
accessor method
String (String str)
16. An object in Java - defined by the class String
a constructor
character string
enumerated type
literal
17. The act of creating an object using the "new" operator
method invocation
data values
pointer
instantiation
18. The Scanner class is part of ___________________
parameter
String object
set
java.util class libary
19. The classes of the Java standard class library are grouped into __________.
escape sequences
String toUpperCase ( )
autoboxing
packages
20. Delimited by double quotation characters
postfix form
java.lang package
string literal
private
21. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
postfix form
instance data
called method
service methods
22. 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 -
class level
set
class
support methods
23. Cast operator has _________ precedence to division
higher
String object
state of an object
casting
24. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
instance data
String object
System.out.println
25. 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)
packages
data values
Scanner scan=new Scanner (System.in);
26. 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
flow of control
tokens
aliases
null
27. A class usually provides services to access and modify __________
data values
parameter
prefix form
attributes of an object
28. 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
polymorphism
expression
RH
static int parseInt (String str)
29. Widening byte: _________ - to int - to long - to float - to double
called method
byte to short
byte nextByte( )
data values
30. Three ways in which Java conversions occur: _________ conversion - promotion - casting
declared
assignment
String format (double number)
attributes of an object
31. ++count; -- count
formal parameters
import java.util*
prefix form
support methods
32. 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
self-governing
packages
Scanner class
set
33. A set of classes that supports the development of programs
initialize
java.util class libary
class library
int length( )
34. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
reserved word void
String object
behaviors of an object
byte to short
35. Modifier>type/void>identifier>parameters>method body
method declaration
wrapper class
Understanding
char charAt (int index)
36. Returns the character at the specified index.
char charAt (int index)
Scanner scan=new Scanner (System.in);
aliases
visibility modifiers
37. 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
support methods
aliases
boolean value
inheritance
38. Two categories of statements that control the flow of executing through a method: __________ and loops
conditionals
literal
prefix form
String (String str)
39. 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.
boolean equals (String str)
local data
signed
scope
40. Returns all input remaining on the current line as a character string.
java.lang package
conditional statement
String nextLine( )
boolean equals (String str)
41. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
mutator method
method declaration
private
java.lang package
42. All wrapper classes are defined in ___________
String format (double number)
double
java.lang package
the DecimalFormat class
43. Count++; count--
postfix form
parameter
primitive variables
escape sequences
44. 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:
method invocation
String next( )
byte to short
num=Integer.parseInt(str);
45. 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( )
flow of control
System.out.println
instance variable
46. Attempts to find the next occurence of the specified pattern - ignoring delimiters
class library
service methods
String findInLine (String pattern)
reference
47. 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
int compareTo (String str)
attributes of an object
String format (double number)
called method
48. An object has behaviors - which are defined by the ________ associated with that object.
operations
int compareTo (String str)
state of an object
num=Integer.parseInt(str);
49. Instance data should be defined with what________ visibility
System.out.println
private
double
method declaration
50. Boolean type conversions are ___________
byte to short
character literal
variable
not possible
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