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. All numeric types are _______ - meaning both positive and negative values can be stored in them
promotion
String format (double number)
long
signed
2. 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
num=Integer.parseInt(str);
Understanding
arithmetic
NumberFormat class
3. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
delimiters
static
instance data
4. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
data values
String substring (int offset - int endIndex)
reference
String toUpperCase ( )
5. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
visibility modifiers
String toLowerCase ( )
inheritance
assignment statement
6. 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
escape sequences
attributes of an object
parentheses
String replace (char oldChar - char newChar)
7. Variables and constants can be referenced in any method of the class by declaring at the _________
string name;
parameter
int length( )
class level
8. Returns the character at the specified index.
Understanding
char charAt (int index)
Scanner scan=new Scanner (System.in);
null
9. A set of classes that supports the development of programs
System.out.println
variable name
byte nextByte( )
class library
10. Constructor: creates a new string object with the same characters as str.
boolean hasNext( )
mutator method
autoboxing
String (String str)
11. Methods in the Math class are ______
double
static
import java.util*
boolean value
12. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
attributes of an object
int compareTo (String str)
char charAt (int index)
java.util class libary
13. Allows all classes in the java.util package to be referenced in the program without qualfying each reference.
java.util class libary
import java.util*
String format (double number)
escape sequences
14. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
parentheses
floating point numbers
reserved word void
packages
15. White space characters such as space characters - tabs - and new lines that separate the elements of input
delimiters
boolean value
double
behaviors of an object
16. All wrapper classes are defined in ___________
java.lang package
pointer
self-governing
double
17. 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
character string
boolean value
Scanner scan=new Scanner (System.in);
autoboxing
18. An explicit data value used in a program
assignment statement
literal
Random class
local data
19. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
inheritance
a constructor
the DecimalFormat class
constructors
20. ______________ operators have higher precedence
signed
method invocation
class library
arithmetic
21. The classes of the Java standard class library are grouped into __________.
encapsulation
parameter list
static
packages
22. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
String (String str)
inheritance
visibility modifiers
java.lang package
23. Returns a new string consisting of this string concatenated with str.
instantiation
floating point numbers
String concat (String str)
polymorphism
24. 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
class library
char charAt (int index)
casting
declared
25. Count++; count--
postfix form
null
reserved word void
public
26. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
underscores
int compareTo (String str)
NumberFormat class
Random class
27. 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
conditionals
wrapper class
boolean equals (String str)
String nextLine( )
28. Constructors do not even _______; therefore they cannot return a value.
instance data
have void
String substring (int offset - int endIndex)
reserved word void
29. 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
wrapper class
literal
aliases
string literal
30. Returns true if the scanner has anotehr token in its input.
variable declaration
variable name
boolean hasNext( )
mutator method
31. 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
dot operator
parentheses
encapsulation
a constructor
32. sides=10;
promotion
assignment statement
wrapper class
class
33. 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
method
String next( )
instance data
String substring (int offset - int endIndex)
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 -
import java.util*
class
character literal
instance variable
35. 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
autoboxing
static int parseInt (String str)
operations
36. 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
java.lang package
inheritance
scope
prefix form
37. An object in Java - defined by the class String
state of an object
character string
formal parameters
long
38. Declared in a class but not inside any particular method
enumerated type
constructors
num=Integer.parseInt(str);
instance data
39. declaration that creates a String variable that holds a reference to a String object; an object variable doesn't hold an object itself - it holds the address of an object
string name;
class library
Scanner scan=new Scanner (System.in);
RH
40. A name for a location in memory used to hold a data value.
variable
String object
String toLowerCase ( )
tokens
41. 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
underscores
RH
floating point numbers
42. New memory space is reserved for that variable every time an instance of the class that is created.
dot operator
arithmetic
instance data
set
43. 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)
character string
wrapper class
service methods
44. The one that is invoked
System.out.println
assignment
called method
reserved word void
45. Attempts to find the next occurence of the specified pattern - ignoring delimiters
reference
class
String findInLine (String pattern)
parameter list
46. 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
a constructor
Scanner class
aliases
String toLowerCase ( )
47. _____ expression evaluated first
constants
dot operator
RH
class level
48. Cast operator has _________ precedence to division
public
null
higher
String replace (char oldChar - char newChar)
49. When a variable is declared inside a method
character string
delimiters
local data
String concat (String str)
50. After an object has been instantiated - we set the _________ to access its methods
Random class
parameter
dot operator
String substring (int offset - int endIndex)