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. The act of creating an object using the "new" operator
instantiation
String toUpperCase ( )
Scanner scan=new Scanner (System.in);
behaviors of an object
2. 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
set
header of a method
Scanner class
flow of control
3. Constants are ______ because the can't be changed once you use the final modifier
public
accessor method
String format (double number)
boolean value
4. Returns the character at the specified index.
delimiters
char charAt (int index)
promotion
instantiation
5. 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
double
variable declaration
autoboxing
promotion
6. 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.
polymorphism
state of an object
scope
a constructor
7. format for constants: all upper-case; separated by ________
underscores
RH
the "import" declaration
conditional statement
8. ______________ operators have higher precedence
constants
String toLowerCase ( )
operations
arithmetic
9. 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)
method
instantiation
String concat (String str)
10. Returns a new string consisting of this string concatenated with str.
the "import" declaration
literal
String (String str)
boolean equals (String str)
11. The order in which statements are executed in a running program
assignment
flow of control
parameter
service methods
12. sides=10;
assignment statement
long
NumberFormat class
class level
13. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
Random class
accessor method
assignment statement
14. The Scanner class is part of ___________________
java.util class libary
literal
higher
method
15. Declared in a class but not inside any particular method
instance data
boolean hasNext( )
pointer
parentheses
16. The one that is invoked
behaviors of an object
escape sequences
called method
arithmetic
17. The classes of the Java standard class library are grouped into __________.
java.lang package
scope
underscores
packages
18. Each piece of data that we send to a method
variable name
signed
parameter
a constructor
19. Two categories of statements that control the flow of executing through a method: __________ and loops
variable
conditionals
class library
dot operator
20. Before you use a variable __________it
initialize
casting
Random ( )
Scanner scan=new Scanner (System.in);
21. 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
int length( )
String format (double number)
casting
null
22. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
num=Integer.parseInt(str);
accessor method
set
boolean equals (String str)
23. An object in Java - defined by the class String
character string
String nextLine( )
string name;
character literal
24. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
parentheses
behaviors of an object
long
null
25. 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
java.util class libary
class library
instance variable
26. 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.
signed
reserved word void
assignment statement
char charAt (int index)
27. Constructor: creates a new string object with the same characters as str.
String next( )
byte to short
String (String str)
underscores
28. 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
conditionals
encapsulation
byte nextByte( )
29. Four integer data types: byte - short - int - _____
parentheses
data values
long
string name;
30. 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)
Random ( )
parameter
called method
31. 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
byte to short
method
postfix form
uninitialized variables
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
num=Integer.parseInt(str);
the "import" declaration
expression
33. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
have void
boolean value
char charAt (int index)
34. The automatic conversion between a primitive value and a corresponding wrapper object.
autoboxing
state of an object
attributes of an object
data values
35. 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
variable name
class level
String toLowerCase ( )
36. Sets the scanner's delimiting pattern.
instantiation
Scanner useDelimiter(String pattern)
byte nextByte( )
have void
37. After an object has been instantiated - we set the _________ to access its methods
self-governing
enumerated type
dot operator
int length( )
38. A name for a location in memory used to hold a data value.
variable
signed
boolean nextBoolean( )
higher
39. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
assignment
parentheses
conditionals
string literal
40. Returns a string containing the specified number formatted according to this object's pattern.
uninitialized variables
String format (double number)
int compareTo (String str)
assignment statement
41. The idea that we can refer to multiple types of related objects over time in consistent ways. it gives us the ability to design powerful and elegant solutions to problems that deal with multiple objects.
instance data
parameter
pointer
polymorphism
42. 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
parameter
attributes of an object
support methods
escape sequences
43. Returns the number of characters in this stirng.
double
assignment conversion
int length( )
character literal
44. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
declared
character literal
scope
45. Elements of input
string literal
literal
tokens
header of a method
46. Every object has two things: a state and a _____ of behaviors
byte nextByte( )
byte to short
set
encapsulation of an object
47. Widening byte: _________ - to int - to long - to float - to double
byte to short
instance variable
conditional statement
parameter
48. 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.
method invocation
assignment conversion
polymorphism
character literal
49. 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
pointer
int compareTo (String str)
private
50. A class usually provides services to access and modify __________
data values
reference
actual parameters
Understanding