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. 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.
String findInLine (String pattern)
parameter list
java.util class libary
inheritance
2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
String findInLine (String pattern)
operations
floating point numbers
accessor method
3. Begins with a backslash character ""
escape sequences
instance variable
arithmetic
parameter list
4. Returns true if the scanner has anotehr token in its input.
boolean hasNext( )
encapsulation
long
literal
5. Expressed in a Java program with single quotes
String toLowerCase ( )
assignment conversion
parameter
character literal
6. The act of creating an object using the "new" operator
java.lang package
instantiation
variable declaration
behaviors of an object
7. Returns the next input token as a character string.
java.lang package
String next( )
tokens
initialize
8. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
String (String str)
String object
dot operator
9. Modifier>type/void>identifier>parameters>method body
instance data
Scanner useDelimiter(String pattern)
method declaration
header of a method
10. 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
expression
Random class
literal
boolean hasNext( )
11. Cast operator has _________ precedence to division
System.out.println
higher
tokens
initialize
12. Each piece of data that we send to a method
parameter
Scanner useDelimiter(String pattern)
class
Scanner scan=new Scanner (System.in);
13. 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
polymorphism
method invocation
assignment conversion
postfix form
14. Also called a selection statement b/c it allows us to choose which statement will be executed next.
inheritance
instantiation
operations
conditional statement
15. 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
encapsulation of an object
char charAt (int index)
assignment statement
boolean value
16. 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.
the DecimalFormat class
inheritance
polymorphism
boolean equalsIgnoreCase (String str)
17. Two floating data types: float - _______
method invocation
private
double
promotion
18. After an object has been instantiated - we set the _________ to access its methods
dot operator
Random class
character literal
class library
19. 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
casting
Understanding
visibility modifiers
java.lang package
20. All wrapper classes are defined in ___________
java.lang package
underscores
higher
have void
21. All numeric types are _______ - meaning both positive and negative values can be stored in them
variable name
signed
variable
String format (double number)
22. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
static int parseInt (String str)
method
null
import java.util*
23. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
conditional statement
String (String str)
constructors
dot operator
24. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
string name;
character literal
encapsulation of an object
25. Represents either a primitive value or an object
literal
variable name
boolean nextBoolean( )
java.lang package
26. Return type specified in the method header can be a primitive type - class name or the ________; when a method does not return any value - void is used as the return type - as is always done with the main method.
reserved word void
System.out.println
instantiation
character string
27. Changes a particular value - e.g.setX - where X is the value they are setting.
delimiters
long
mutator method
actual parameters
28. The Scanner class is part of ___________________
header of a method
boolean equalsIgnoreCase (String str)
int length( )
java.util class libary
29. A ________________ is immutable.
casting
instantiation
String object
local data
30. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
behaviors of an object
inheritance
String object
header of a method
31. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
behaviors of an object
instance variable
String findInLine (String pattern)
casting
32. An object has behaviors - which are defined by the ________ associated with that object.
long
operations
signed
char charAt (int index)
33. A set of classes that supports the development of programs
Random ( )
Scanner useDelimiter(String pattern)
class library
instance data
34. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
System.out.println
NumberFormat class
java.lang package
Random ( )
35. The automatic conversion between a primitive value and a corresponding wrapper object.
wrapper class
autoboxing
packages
not possible
36. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
public
String nextLine( )
declared
service methods
37. 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
variable declaration
expression
formal parameters
aliases
38. 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.
String replace (char oldChar - char newChar)
set
data values
scope
39. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
boolean equalsIgnoreCase (String str)
packages
scope
40. The names of the parameters in the header of the method declaration
string literal
formal parameters
Scanner class
not possible
41. 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
aliases
escape sequences
String substring (int offset - int endIndex)
char charAt (int index)
42. Boolean type conversions are ___________
String concat (String str)
not possible
import java.util*
declared
43. Declared in a class but not inside any particular method
constructors
declared
java.lang package
instance data
44. ______________ operators have higher precedence
assignment conversion
public
scope
arithmetic
45. The declarations of object variables have a similar structure to the declaration of _______________
String toUpperCase ( )
primitive variables
null
visibility modifiers
46. 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
static
casting
RH
reference
47. 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
set
parameter
Understanding
Scanner class
48. ++count; -- count
java.lang package
boolean value
prefix form
RH
49. Constants are ______ because the can't be changed once you use the final modifier
String object
public
return statement
private
50. 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
higher
boolean nextBoolean( )
character literal
method