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. _____ expression evaluated first
primitive variables
RH
String toLowerCase ( )
Understanding
2. The declarations of object variables have a similar structure to the declaration of _______________
formal parameters
primitive variables
constructors
character literal
3. They clarify the role a certain number has in the program.
aliases
java.util class libary
promotion
constants
4. 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
support methods
method
signed
character literal
5. Part of the java.util class; picks a number at random out of a range of values.
Random class
java.util class libary
boolean value
static
6. Variables and constants can be referenced in any method of the class by declaring at the _________
data values
constants
class level
Scanner useDelimiter(String pattern)
7. Returns the character at the specified index.
int compareTo (String str)
method
char charAt (int index)
parameter
8. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
String toLowerCase ( )
variable name
encapsulation of an object
arithmetic
9. A name for a location in memory used to hold a data value.
variable name
declared
variable
java.util class libary
10. 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
actual parameters
enumerated type
num=Integer.parseInt(str);
11. Making it difficult - if not impossible - for code outside of a class to "reach in" and chnage the value of a variable that is declared inside that class.
state of an object
encapsulation
RH
String format (double number)
12. Control access to the members of a class. the reserved words public and private are visibility modifiers that can be applied to the variables and methods of a class.
tokens
assignment statement
return statement
visibility modifiers
13. Variables that don't contain any data
class level
constants
uninitialized variables
higher
14. Three ways in which Java conversions occur: _________ conversion - promotion - casting
state of an object
escape sequences
assignment
string literal
15. Returns true if the scanner has anotehr token in its input.
primitive variables
boolean hasNext( )
class library
String replace (char oldChar - char newChar)
16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
primitive variables
string literal
method invocation
self-governing
17. 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
enumerated type
byte to short
casting
method
18. 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
boolean equals (String str)
encapsulation of an object
flow of control
String findInLine (String pattern)
19. How classes are created from other classes. the definition of one class can be based on another class that already exists. inheritance is a form of software reuse - capitalizing on the similarities between various kinds of classes that we want to cre
inheritance
variable
formal parameters
public
20. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
header of a method
public
int length( )
state of an object
21. 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
flow of control
underscores
constructors
22. A variable that refers to an object must be __________
declared
the DecimalFormat class
data values
visibility modifiers
23. The Scanner class is part of ___________________
java.util class libary
reference
promotion
String (String str)
24. The order in which statements are executed in a running program
dot operator
double
parameter
flow of control
25. Returns the int corresponding to the value stored in the specified string
static int parseInt (String str)
support methods
byte nextByte( )
operations
26. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
NumberFormat class
data values
return statement
27. 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.
operations
num=Integer.parseInt(str);
long
reserved word void
28. 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
promotion
inheritance
parameter list
expression
29. Instance data should be defined with what________ visibility
boolean value
parameter
long
private
30. 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
method invocation
underscores
System.out.println
the "import" declaration
31. Each piece of data that we send to a method
String concat (String str)
instance data
parameter
static int parseInt (String str)
32. A set of classes that supports the development of programs
String next( )
Understanding
class library
uninitialized variables
33. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
class level
static
the "import" declaration
operations
34. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
parameter
prefix form
constructors
char charAt (int index)
35. 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.
return statement
Random ( )
polymorphism
String (String str)
36. 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
return statement
parentheses
tokens
boolean value
37. 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
char charAt (int index)
long
reference
Scanner class
38. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
int compareTo (String str)
not possible
character string
behaviors of an object
39. Declared in a class but not inside any particular method
instance data
self-governing
String toLowerCase ( )
reference
40. A method that returns a value must have a _________
class
variable name
return statement
string name;
41. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
parameter
actual parameters
method
accessor method
42. Widening byte: _________ - to int - to long - to float - to double
class level
byte to short
service methods
string name;
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
uninitialized variables
boolean equalsIgnoreCase (String str)
aliases
called method
44. An explicit data value used in a program
assignment statement
literal
private
NumberFormat class
45. Begins with a backslash character ""
method
long
escape sequences
Scanner useDelimiter(String pattern)
46. All wrapper classes are defined in ___________
return statement
java.lang package
not possible
parentheses
47. ______________ operators have higher precedence
polymorphism
boolean nextBoolean( )
java.lang package
arithmetic
48. The classes of the Java standard class library are grouped into __________.
conditionals
packages
escape sequences
autoboxing
49. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
NumberFormat class
num=Integer.parseInt(str);
encapsulation
String replace (char oldChar - char newChar)
50. Returns a string containing the specified number formatted according to this object's pattern.
method declaration
instantiation
String format (double number)
Understanding