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
signed
instance data
num=Integer.parseInt(str);
assignment
2. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
return statement
dot operator
instance variable
higher
3. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
character literal
floating point numbers
header of a method
String concat (String str)
4. 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
num=Integer.parseInt(str);
Scanner class
private
accessor method
5. An explicit data value used in a program
uninitialized variables
literal
service methods
conditionals
6. 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
declared
String nextLine( )
public
expression
7. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
private
declared
variable
8. Returns the next input token as the indicated type.
String next( )
byte nextByte( )
postfix form
variable declaration
9. This declaration creates a Scanner object that reads input from the keyboard
self-governing
Scanner scan=new Scanner (System.in);
wrapper class
aliases
10. 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
boolean equals (String str)
assignment conversion
constructors
11. A null reference indicates that a variable does not refer to an object
null
System.out.println
underscores
the "import" declaration
12. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
arithmetic
delimiters
initialize
header of a method
13. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
promotion
service methods
instance data
called method
14. sides=10;
assignment statement
class
byte nextByte( )
RH
15. A method that returns a value must have a _________
return statement
boolean value
formal parameters
static
16. A value that is passed into a method when it is invoked
parameter list
boolean equals (String str)
parameter
string literal
17. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
int compareTo (String str)
boolean equalsIgnoreCase (String str)
parentheses
String nextLine( )
18. The classes of the Java standard class library are grouped into __________.
byte nextByte( )
packages
reserved word void
Scanner class
19. Two categories of statements that control the flow of executing through a method: __________ and loops
assignment statement
String toLowerCase ( )
conditionals
RH
20. 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.
enumerated type
System.out.println
Random class
boolean value
21. Variables and constants can be referenced in any method of the class by declaring at the _________
conditional statement
assignment conversion
class level
visibility modifiers
22. Returns the next input token as a character string.
instance data
java.lang package
return statement
String next( )
23. Returns the character at the specified index.
char charAt (int index)
Random ( )
conditionals
pointer
24. They clarify the role a certain number has in the program.
data values
constants
initialize
dot operator
25. 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)
flow of control
underscores
String format (double number)
26. Every object has two things: a state and a _____ of behaviors
boolean hasNext( )
expression
set
String format (double number)
27. 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.
polymorphism
variable
casting
import java.util*
28. Methods in the Math class are ______
import java.util*
variable name
assignment statement
static
29. Attempts to find the next occurence of the specified pattern - ignoring delimiters
boolean equalsIgnoreCase (String str)
String findInLine (String pattern)
String toUpperCase ( )
RH
30. Protection and management of an object's info. this implies that the object should be self-governing. the only changes made to the state of the object should be accomplished by that object's methods. other objects should not be able to "reach in" to
String next( )
polymorphism
encapsulation of an object
autoboxing
31. Variables that don't contain any data
byte to short
uninitialized variables
static int parseInt (String str)
String (String str)
32. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
conditional statement
string literal
have void
java.lang package
33. 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
local data
parentheses
Scanner scan=new Scanner (System.in);
34. The names of the parameters in the header of the method declaration
operations
Scanner useDelimiter(String pattern)
reference
formal parameters
35. ______________ operators have higher precedence
Scanner useDelimiter(String pattern)
int compareTo (String str)
instance data
arithmetic
36. 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
System.out.println
uninitialized variables
higher
aliases
37. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
a constructor
underscores
boolean equalsIgnoreCase (String str)
actual parameters
38. An object in Java - defined by the class String
character string
polymorphism
static
int length( )
39. Represents either a primitive value or an object
variable name
boolean value
conditionals
casting
40. Returns a new string consisting of this string concatenated with str.
data values
constructors
String nextLine( )
boolean equals (String str)
41. A name for a location in memory used to hold a data value.
boolean equalsIgnoreCase (String str)
variable
String next( )
class level
42. 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
higher
support methods
aliases
Understanding
43. Boolean type conversions are ___________
java.lang package
Random ( )
not possible
String format (double number)
44. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
parentheses
self-governing
the DecimalFormat class
45. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
formal parameters
not possible
behaviors of an object
variable declaration
46. A ____________ and definition always give the parameter list in parentheses after the method name. if there are no parameters - an empty set of parentheses is used
method invocation
not possible
Random ( )
static
47. Returns a string containing the specified number formatted according to this object's pattern.
called method
String format (double number)
escape sequences
System.out.println
48. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
called method
instantiation
accessor method
visibility modifiers
49. Elements of input
casting
RH
tokens
boolean equals (String str)
50. Declared in a class but not inside any particular method
boolean equals (String str)
instance data
parameter
String toUpperCase ( )