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. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
num=Integer.parseInt(str);
mutator method
floating point numbers
behaviors of an object
2. Returns a new string consisting of this string concatenated with str.
encapsulation of an object
private
reference
String concat (String str)
3. 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
Understanding
delimiters
long
state of an object
4. 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
header of a method
primitive variables
attributes of an object
encapsulation
5. 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.
double
support methods
parentheses
assignment conversion
6. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
class
uninitialized variables
service methods
postfix form
7. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
instance data
String object
state of an object
character literal
8. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
casting
static int parseInt (String str)
delimiters
NumberFormat class
9. The classes of the Java standard class library are grouped into __________.
postfix form
packages
private
boolean value
10. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
java.lang package
constructors
static int parseInt (String str)
int compareTo (String str)
11. Variables and constants can be referenced in any method of the class by declaring at the _________
the "import" declaration
static
character literal
class level
12. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
declared
variable name
variable
13. When a variable is declared inside a method
not possible
attributes of an object
String toLowerCase ( )
local data
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
flow of control
declared
java.lang package
casting
15. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
private
higher
constants
16. sides=10;
import java.util*
String toLowerCase ( )
the DecimalFormat class
assignment statement
17. A set of classes that supports the development of programs
dot operator
the "import" declaration
local data
class library
18. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object
Scanner class
string name;
have void
null
19. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
String findInLine (String pattern)
instance variable
actual parameters
20. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
header of a method
conditionals
int length( )
mutator method
21. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
java.lang package
higher
self-governing
state of an object
22. Constructor: creates a new pseudorandom number generator.
String next( )
signed
Random ( )
string name;
23. A null reference indicates that a variable does not refer to an object
character literal
boolean hasNext( )
null
boolean value
24. 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
casting
Random ( )
boolean value
actual parameters
25. The names of the parameters in the header of the method declaration
formal parameters
autoboxing
packages
assignment
26. 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
double
wrapper class
int length( )
27. Expressed in a Java program with single quotes
method
character literal
not possible
data values
28. Each piece of data that we send to a method
accessor method
enumerated type
dot operator
parameter
29. Changes a particular value - e.g.setX - where X is the value they are setting.
instance data
parentheses
mutator method
boolean equalsIgnoreCase (String str)
30. A ________________ is immutable.
private
byte nextByte( )
method invocation
String object
31. ______________ operators have higher precedence
the "import" declaration
escape sequences
String substring (int offset - int endIndex)
arithmetic
32. Represents either a primitive value or an object
class library
promotion
the "import" declaration
variable name
33. Cast operator has _________ precedence to division
character literal
called method
higher
num=Integer.parseInt(str);
34. Count++; count--
flow of control
assignment
postfix form
packages
35. Boolean type conversions are ___________
boolean equalsIgnoreCase (String str)
scope
not possible
formal parameters
36. The act of creating an object using the "new" operator
static
state of an object
instantiation
declared
37. Before you use a variable __________it
Scanner scan=new Scanner (System.in);
initialize
Understanding
mutator method
38. New memory space is reserved for that variable every time an instance of the class that is created.
instance data
character string
declared
reserved word void
39. 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
postfix form
encapsulation of an object
RH
40. The values passed into a method in an invocation; these are called the arguments to the method
casting
Scanner useDelimiter(String pattern)
dot operator
actual parameters
41. Constructor: creates a new string object with the same characters as str.
string name;
declared
String (String str)
initialize
42. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
variable name
escape sequences
underscores
instance variable
43. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
Random ( )
method invocation
behaviors of an object
self-governing
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:
header of a method
set
int length( )
num=Integer.parseInt(str);
45. A method that returns a value must have a _________
java.util class libary
data values
return statement
boolean hasNext( )
46. 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.
floating point numbers
NumberFormat class
encapsulation
parameter list
47. format for constants: all upper-case; separated by ________
attributes of an object
visibility modifiers
underscores
boolean value
48. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
accessor method
have void
instantiation
underscores
49. We use an object when we have a _________ to it
int compareTo (String str)
boolean hasNext( )
formal parameters
reference
50. The order in which statements are executed in a running program
flow of control
boolean hasNext( )
instance variable
attributes of an object