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. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
Scanner scan=new Scanner (System.in);
instance variable
escape sequences
2. Count++; count--
tokens
postfix form
num=Integer.parseInt(str);
parentheses
3. Also called a selection statement b/c it allows us to choose which statement will be executed next.
have void
aliases
character string
conditional statement
4. Elements of input
String substring (int offset - int endIndex)
java.lang package
tokens
a constructor
5. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
class library
floating point numbers
autoboxing
primitive variables
6. Each piece of data that we send to a method
String concat (String str)
String (String str)
string name;
parameter
7. The order in which statements are executed in a running program
conditionals
parameter list
flow of control
not possible
8. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String nextLine( )
support methods
parameter list
String toLowerCase ( )
9. Begins with a backslash character ""
import java.util*
self-governing
conditionals
escape sequences
10. A method that returns a value must have a _________
polymorphism
return statement
variable name
primitive variables
11. This declaration creates a Scanner object that reads input from the keyboard
accessor method
public
boolean nextBoolean( )
Scanner scan=new Scanner (System.in);
12. 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
byte nextByte( )
System.out.println
promotion
class library
13. Boolean type conversions are ___________
inheritance
the "import" declaration
not possible
parentheses
14. Sets the scanner's delimiting pattern.
constructors
java.lang package
have void
Scanner useDelimiter(String pattern)
15. Delimited by double quotation characters
the DecimalFormat class
string literal
not possible
expression
16. 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.
encapsulation
instance data
support methods
instantiation
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
casting
inheritance
String format (double number)
operations
18. A name for a location in memory used to hold a data value.
java.lang package
variable
Scanner scan=new Scanner (System.in);
instance variable
19. Returns the number of characters in this stirng.
int length( )
arithmetic
import java.util*
String toLowerCase ( )
20. Methods in the Math class are ______
assignment conversion
String toUpperCase ( )
static
set
21. The one that is invoked
called method
String replace (char oldChar - char newChar)
System.out.println
String object
22. 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
assignment conversion
long
public
23. 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 -
constants
class
escape sequences
RH
24. 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
wrapper class
parameter
conditional statement
String substring (int offset - int endIndex)
25. 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.
boolean value
visibility modifiers
encapsulation of an object
int length( )
26. 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
inheritance
assignment statement
method
static int parseInt (String str)
27. 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.
String substring (int offset - int endIndex)
instance variable
have void
assignment conversion
28. 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
polymorphism
boolean value
underscores
variable name
29. A null reference indicates that a variable does not refer to an object
null
conditionals
instantiation
the DecimalFormat class
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
character string
encapsulation of an object
static
RH
31. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
RH
System.out.println
the "import" declaration
self-governing
32. Cast operator has _________ precedence to division
static int parseInt (String str)
higher
byte to short
set
33. 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
wrapper class
a constructor
boolean equals (String str)
underscores
34. 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
character literal
behaviors of an object
polymorphism
attributes of an object
35. Returns all input remaining on the current line as a character string.
String nextLine( )
casting
initialize
a constructor
36. Expressed in a Java program with single quotes
byte nextByte( )
return statement
character literal
flow of control
37. Returns a new string consisting of this string concatenated with str.
String concat (String str)
flow of control
service methods
num=Integer.parseInt(str);
38. 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
operations
boolean hasNext( )
expression
String format (double number)
39. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
parameter
assignment statement
wrapper class
java.lang package
40. 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
service methods
java.lang package
variable declaration
private
41. 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
encapsulation
reserved word void
boolean equalsIgnoreCase (String str)
42. Returns a new string consisting of this string concatenated with str.
double
service methods
boolean equals (String str)
parentheses
43. ______________ operators have higher precedence
arithmetic
reference
java.lang package
boolean equalsIgnoreCase (String str)
44. Changes a particular value - e.g.setX - where X is the value they are setting.
static
pointer
class library
mutator method
45. The declarations of object variables have a similar structure to the declaration of _______________
method
autoboxing
boolean nextBoolean( )
primitive variables
46. 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.
Scanner useDelimiter(String pattern)
conditionals
instance data
scope
47. Variables and constants can be referenced in any method of the class by declaring at the _________
char charAt (int index)
parentheses
accessor method
class level
48. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
Scanner scan=new Scanner (System.in);
variable declaration
public
int compareTo (String str)
49. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
pointer
import java.util*
character string
behaviors of an object
50. An explicit data value used in a program
literal
enumerated type
not possible
num=Integer.parseInt(str);