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. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
service methods
Scanner class
String toLowerCase ( )
Random ( )
2. Modifier>type/void>identifier>parameters>method body
assignment conversion
escape sequences
method declaration
operations
3. Elements of input
the DecimalFormat class
tokens
actual parameters
parameter
4. White space characters such as space characters - tabs - and new lines that separate the elements of input
variable name
support methods
String (String str)
delimiters
5. Count++; count--
method
java.lang package
num=Integer.parseInt(str);
postfix form
6. A set of classes that supports the development of programs
set
signed
Understanding
class library
7. 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 literal
variable
string name;
boolean value
8. Returns true if the scanner has anotehr token in its input.
parameter
boolean hasNext( )
parameter list
java.util class libary
9. The one that is invoked
assignment statement
operations
accessor method
called method
10. Returns the int corresponding to the value stored in the specified string
reference
packages
static int parseInt (String str)
accessor method
11. Each piece of data that we send to a method
variable
expression
scope
parameter
12. Boolean type conversions are ___________
encapsulation
not possible
java.lang package
prefix form
13. 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
pointer
String format (double number)
mutator method
14. 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.
visibility modifiers
reference
reserved word void
casting
15. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
constructors
java.util class libary
NumberFormat class
assignment
16. Instance data should be defined with what________ visibility
String nextLine( )
expression
private
visibility modifiers
17. The declarations of object variables have a similar structure to the declaration of _______________
import java.util*
static
declared
primitive variables
18. 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
instance data
import java.util*
String nextLine( )
a constructor
19. _____ expression evaluated first
operations
RH
delimiters
set
20. ____________ is instantiated in the traditional way using the new operator.
wrapper class
reserved word void
the DecimalFormat class
static int parseInt (String str)
21. 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.
variable declaration
scope
constants
character literal
22. The automatic conversion between a primitive value and a corresponding wrapper object.
scope
java.lang package
autoboxing
underscores
23. 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
constants
the DecimalFormat class
underscores
24. The Scanner class is part of ___________________
java.util class libary
packages
have void
byte to short
25. A class usually provides services to access and modify __________
variable
underscores
local data
data values
26. Widening byte: _________ - to int - to long - to float - to double
floating point numbers
string name;
character literal
byte to short
27. Returns an integer indicating if this string is lexically before - equal to - or lexically after the string str.
initialize
attributes of an object
java.util class libary
int compareTo (String str)
28. Returns a string containing the specified number formatted according to this object's pattern.
public
String format (double number)
promotion
Random ( )
29. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
encapsulation
java.lang package
char charAt (int index)
header of a method
30. Represents either a primitive value or an object
class library
boolean hasNext( )
variable name
double
31. A ________________ is immutable.
character literal
assignment conversion
class library
String object
32. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
arithmetic
support methods
reference
underscores
33. Four integer data types: byte - short - int - _____
polymorphism
parameter list
called method
long
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
attributes of an object
parentheses
underscores
Scanner useDelimiter(String pattern)
35. 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
String format (double number)
flow of control
boolean value
Random class
36. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
state of an object
encapsulation
System.out.println
37. A value that is passed into a method when it is invoked
formal parameters
assignment conversion
parameter
String object
38. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
num=Integer.parseInt(str);
variable declaration
String next( )
java.lang package
39. 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
Scanner scan=new Scanner (System.in);
static int parseInt (String str)
conditional statement
Understanding
40. sides=10;
assignment statement
constants
packages
method
41. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
conditional statement
instance variable
boolean hasNext( )
delimiters
42. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean equalsIgnoreCase (String str)
java.lang package
the "import" declaration
tokens
43. All numeric types are _______ - meaning both positive and negative values can be stored in them
conditionals
wrapper class
signed
casting
44. 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
operations
method invocation
variable declaration
long
45. Returns the number of characters in this stirng.
num=Integer.parseInt(str);
int length( )
Scanner useDelimiter(String pattern)
floating point numbers
46. Since an object ref var holds the address of the object - it can be thought of as a ____ to the location in memory where the object is held
boolean value
pointer
escape sequences
double
47. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
state of an object
character string
String nextLine( )
num=Integer.parseInt(str);
48. 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.
the DecimalFormat class
tokens
String toLowerCase ( )
parameter list
49. 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.
floating point numbers
instance data
String format (double number)
reserved word void
50. After an object has been instantiated - we set the _________ to access its methods
dot operator
variable name
class
String substring (int offset - int endIndex)