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. A set of classes that supports the development of programs
class library
byte nextByte( )
class
constructors
2. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
String toUpperCase ( )
assignment
instance variable
variable name
3. Three ways in which Java conversions occur: _________ conversion - promotion - casting
assignment
reference
num=Integer.parseInt(str);
String (String str)
4. Returns a string containing the specified number formatted according to this object's pattern.
byte nextByte( )
promotion
String format (double number)
set
5. Every object has two things: a state and a _____ of behaviors
java.lang package
set
a constructor
service methods
6. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
String next( )
double
java.util class libary
java.lang package
7. Expressed in a Java program with single quotes
parameter
character literal
enumerated type
promotion
8. Each piece of data that we send to a method
parameter
String (String str)
static
actual parameters
9. The one that is invoked
System.out.println
called method
string name;
variable
10. Four integer data types: byte - short - int - _____
null
boolean hasNext( )
long
class library
11. Attempts to find the next occurence of the specified pattern - ignoring delimiters
String findInLine (String pattern)
return statement
arithmetic
expression
12. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
arithmetic
polymorphism
boolean equalsIgnoreCase (String str)
parentheses
13. Variables that don't contain any data
int compareTo (String str)
num=Integer.parseInt(str);
reference
uninitialized variables
14. 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
literal
a constructor
String concat (String str)
promotion
15. Methods in the Math class are ______
static
instance variable
delimiters
boolean equals (String str)
16. 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
RH
reference
escape sequences
17. Cast operator has _________ precedence to division
higher
attributes of an object
Random ( )
set
18. A null reference indicates that a variable does not refer to an object
null
static
character literal
have void
19. Returns the number of characters in this stirng.
encapsulation of an object
long
private
int length( )
20. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
state of an object
constants
String object
escape sequences
21. Returns the next input token as the indicated type.
boolean nextBoolean( )
escape sequences
constants
string literal
22. Constants are ______ because the can't be changed once you use the final modifier
public
String format (double number)
conditional statement
higher
23. All numeric types are _______ - meaning both positive and negative values can be stored in them
declared
String replace (char oldChar - char newChar)
tokens
signed
24. A variable that refers to an object must be __________
declared
parameter
a constructor
encapsulation of an object
25. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
data values
dot operator
autoboxing
service methods
26. Two categories of statements that control the flow of executing through a method: __________ and loops
service methods
underscores
conditionals
signed
27. A name for a location in memory used to hold a data value.
variable
primitive variables
byte to short
the "import" declaration
28. 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.
parameter list
arithmetic
signed
polymorphism
29. 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
java.lang package
long
method invocation
30. The names of the parameters in the header of the method declaration
Understanding
public
local data
formal parameters
31. 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.
int compareTo (String str)
enumerated type
arithmetic
polymorphism
32. _____ expression evaluated first
assignment statement
RH
enumerated type
Scanner class
33. A class usually provides services to access and modify __________
data values
inheritance
method
accessor method
34. The values passed into a method in an invocation; these are called the arguments to the method
static
accessor method
actual parameters
literal
35. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
boolean nextBoolean( )
character string
support methods
Scanner class
36. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
public
casting
the "import" declaration
37. 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
pointer
wrapper class
escape sequences
Random class
38. A value that is passed into a method when it is invoked
String findInLine (String pattern)
Scanner scan=new Scanner (System.in);
parameter
String concat (String str)
39. Declared in a class but not inside any particular method
double
instance data
java.lang package
attributes of an object
40. The Scanner class is part of ___________________
java.util class libary
a constructor
promotion
floating point numbers
41. ++count; -- count
prefix form
String nextLine( )
Scanner useDelimiter(String pattern)
formal parameters
42. 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
public
escape sequences
state of an object
43. ____________ is instantiated in the traditional way using the new operator.
pointer
literal
the DecimalFormat class
String toUpperCase ( )
44. 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)
import java.util*
java.lang package
byte to short
45. Before you use a variable __________it
String toUpperCase ( )
attributes of an object
initialize
underscores
46. Returns true if the scanner has anotehr token in its input.
string literal
primitive variables
boolean hasNext( )
support methods
47. An object in Java - defined by the class String
boolean value
character string
assignment statement
class
48. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
string name;
NumberFormat class
inheritance
scope
49. Variables and constants can be referenced in any method of the class by declaring at the _________
string literal
class level
attributes of an object
String substring (int offset - int endIndex)
50. Instance data should be defined with what________ visibility
instance data
assignment conversion
floating point numbers
private