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. Three ways in which Java conversions occur: _________ conversion - promotion - casting
service methods
String object
assignment
delimiters
2. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
conditional statement
parentheses
instance data
initialize
3. Represents either a primitive value or an object
variable name
Scanner class
String toLowerCase ( )
double
4. Part of the java.util class; picks a number at random out of a range of values.
delimiters
byte nextByte( )
promotion
Random class
5. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
inheritance
boolean nextBoolean( )
operations
state of an object
6. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
the "import" declaration
accessor method
static int parseInt (String str)
variable declaration
7. An explicit data value used in a program
wrapper class
literal
static int parseInt (String str)
public
8. 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
boolean nextBoolean( )
Understanding
arithmetic
reserved word void
9. All wrapper classes are defined in ___________
java.lang package
method
set
pointer
10. Returns the int corresponding to the value stored in the specified string
long
prefix form
method
static int parseInt (String str)
11. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
behaviors of an object
NumberFormat class
String concat (String str)
called method
12. 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
reference
private
casting
expression
13. ______________ operators have higher precedence
formal parameters
int length( )
arithmetic
packages
14. Returns the number of characters in this stirng.
attributes of an object
int length( )
flow of control
underscores
15. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
String toLowerCase ( )
java.lang package
set
called method
16. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
operations
class
instance variable
17. The classes of the Java standard class library are grouped into __________.
variable name
java.lang package
packages
variable
18. 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.
parameter list
literal
boolean hasNext( )
String nextLine( )
19. Returns the next input token as a character string.
long
return statement
public
String next( )
20. The values passed into a method in an invocation; these are called the arguments to the method
reference
expression
actual parameters
instantiation
21. 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
constructors
arithmetic
Scanner class
actual parameters
22. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
header of a method
support methods
casting
variable name
23. 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
actual parameters
tokens
boolean nextBoolean( )
casting
24. Attempts to find the next occurence of the specified pattern - ignoring delimiters
inheritance
String findInLine (String pattern)
uninitialized variables
String object
25. A name for a location in memory used to hold a data value.
tokens
variable
String nextLine( )
reference
26. Constructor: creates a new string object with the same characters as str.
String (String str)
underscores
inheritance
higher
27. 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
String nextLine( )
double
System.out.println
boolean hasNext( )
28. 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.
encapsulation of an object
public
enumerated type
boolean hasNext( )
29. Every object has two things: a state and a _____ of behaviors
set
NumberFormat class
String findInLine (String pattern)
RH
30. 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
constants
the DecimalFormat class
tokens
31. Methods in the Math class are ______
flow of control
static
instantiation
Scanner class
32. 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:
promotion
java.lang package
constants
num=Integer.parseInt(str);
33. Constructors do not even _______; therefore they cannot return a value.
have void
boolean nextBoolean( )
self-governing
a constructor
34. 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 -
character literal
parameter
null
class
35. format for constants: all upper-case; separated by ________
String nextLine( )
reference
underscores
public
36. Returns a new string that is a subset of this string starting at index offset and extending through endIndx-1;
java.lang package
Scanner scan=new Scanner (System.in);
reference
String substring (int offset - int endIndex)
37. 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.
state of an object
assignment conversion
a constructor
flow of control
38. The act of creating an object using the "new" operator
Scanner useDelimiter(String pattern)
character literal
instantiation
java.lang package
39. Returns true if the scanner has anotehr token in its input.
visibility modifiers
dot operator
boolean hasNext( )
character literal
40. The names of the parameters in the header of the method declaration
class level
formal parameters
character literal
actual parameters
41. Elements of input
boolean nextBoolean( )
tokens
inheritance
boolean value
42. Four integer data types: byte - short - int - _____
autoboxing
header of a method
delimiters
long
43. 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
header of a method
java.lang package
constants
aliases
44. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
Random class
dot operator
RH
instance variable
45. 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
String substring (int offset - int endIndex)
java.lang package
wrapper class
class
46. Returns all input remaining on the current line as a character string.
num=Integer.parseInt(str);
operations
parentheses
String nextLine( )
47. _____ expression evaluated first
RH
polymorphism
NumberFormat class
state of an object
48. Returns the next input token as the indicated type.
String next( )
int length( )
boolean nextBoolean( )
signed
49. Occurs automatically when certain operators need to modify their opeands in order to perform the operation
floating point numbers
primitive variables
dot operator
promotion
50. The one that is invoked
String substring (int offset - int endIndex)
Understanding
visibility modifiers
called method