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 that don't contain any data
Random ( )
String toUpperCase ( )
delimiters
uninitialized variables
2. 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
casting
declared
inheritance
primitive variables
3. We use an object when we have a _________ to it
string name;
conditionals
Scanner class
reference
4. ______________ operators have higher precedence
constants
arithmetic
prefix form
double
5. 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)
class library
parentheses
boolean hasNext( )
6. Returns the character at the specified index.
tokens
Scanner scan=new Scanner (System.in);
variable declaration
char charAt (int index)
7. 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.
reference
assignment conversion
accessor method
variable declaration
8. The declarations of object variables have a similar structure to the declaration of _______________
return statement
String replace (char oldChar - char newChar)
reserved word void
primitive variables
9. 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
Understanding
method
long
class library
10. Modifier>type/void>identifier>parameters>method body
parameter
String concat (String str)
method declaration
class
11. Widening byte: _________ - to int - to long - to float - to double
byte to short
instantiation
floating point numbers
mutator method
12. 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
delimiters
variable declaration
null
constants
13. Changes a particular value - e.g.setX - where X is the value they are setting.
variable name
Understanding
static
mutator method
14. Begins with a backslash character ""
behaviors of an object
escape sequences
RH
boolean nextBoolean( )
15. Also called a selection statement b/c it allows us to choose which statement will be executed next.
variable name
conditional statement
constructors
floating point numbers
16. 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
have void
class level
variable name
17. An object has behaviors - which are defined by the ________ associated with that object.
inheritance
encapsulation
operations
data values
18. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
String toUpperCase ( )
String toLowerCase ( )
higher
String substring (int offset - int endIndex)
19. 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.
constructors
polymorphism
Scanner scan=new Scanner (System.in);
conditionals
20. 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
class
Random ( )
a constructor
wrapper class
21. Sets the scanner's delimiting pattern.
static
long
Scanner useDelimiter(String pattern)
conditionals
22. 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.
accessor method
mutator method
formal parameters
scope
23. Two categories of statements that control the flow of executing through a method: __________ and loops
primitive variables
conditionals
String nextLine( )
byte to short
24. 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.
a constructor
polymorphism
parameter list
System.out.println
25. Part of the java.util class; picks a number at random out of a range of values.
a constructor
long
string name;
Random class
26. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
uninitialized variables
accessor method
String toUpperCase ( )
static int parseInt (String str)
27. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
the DecimalFormat class
have void
dot operator
28. Returns the next input token as a character string.
String next( )
encapsulation of an object
parentheses
literal
29. Elements of input
String substring (int offset - int endIndex)
instantiation
tokens
wrapper class
30. Five steps of problem-solving: ____________ the problem - Designing a solution - Considering alternatives to the solution and refining the solution - Implementing the solution - Testing the solution and fixing any problems that exist
reference
inheritance
Understanding
arithmetic
31. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
method declaration
String toUpperCase ( )
encapsulation
32. Before you use a variable __________it
the "import" declaration
Scanner class
initialize
parameter list
33. Each piece of data that we send to a method
parameter
class
primitive variables
signed
34. When a variable is declared inside a method
pointer
parentheses
local data
parameter
35. ++count; -- count
the DecimalFormat class
prefix form
NumberFormat class
character literal
36. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
conditional statement
import java.util*
the "import" declaration
String toUpperCase ( )
37. 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
attributes of an object
a constructor
pointer
header of a method
38. The order in which statements are executed in a running program
flow of control
return statement
int length( )
pointer
39. Three ways in which Java conversions occur: _________ conversion - promotion - casting
String nextLine( )
instantiation
assignment
service methods
40. A set of classes that supports the development of programs
class library
dot operator
underscores
operations
41. The names of the parameters in the header of the method declaration
signed
boolean nextBoolean( )
formal parameters
escape sequences
42. All numeric types are _______ - meaning both positive and negative values can be stored in them
reference
signed
System.out.println
visibility modifiers
43. 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
int length( )
Scanner class
class
44. 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
pointer
scope
encapsulation of an object
local data
45. Returns all input remaining on the current line as a character string.
variable declaration
String nextLine( )
a constructor
Scanner scan=new Scanner (System.in);
46. 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
System.out.println
assignment
class library
arithmetic
47. Instance data should be defined with what________ visibility
private
boolean hasNext( )
String nextLine( )
prefix form
48. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
variable
floating point numbers
String findInLine (String pattern)
parameter
49. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
primitive variables
escape sequences
autoboxing
service methods
50. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
higher
int compareTo (String str)
wrapper class
private