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. Sets the scanner's delimiting pattern.
Scanner useDelimiter(String pattern)
boolean nextBoolean( )
header of a method
variable
2. 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
string name;
character string
not possible
expression
3. Methods that provide services to the client must be declared with public visibility so that they can be invoked by the client.
self-governing
signed
Random ( )
service methods
4. The order in which statements are executed in a running program
flow of control
string literal
state of an object
a constructor
5. Constructor: creates a new pseudorandom number generator.
promotion
Random ( )
service methods
System.out.println
6. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
variable declaration
floating point numbers
constructors
header of a method
7. format for constants: all upper-case; separated by ________
character string
underscores
tokens
behaviors of an object
8. Expressed in a Java program with single quotes
character literal
flow of control
have void
method
9. Returns the character at the specified index.
int length( )
String replace (char oldChar - char newChar)
char charAt (int index)
Scanner class
10. Before you use a variable __________it
set
initialize
variable
tokens
11. Constructors do not even _______; therefore they cannot return a value.
String (String str)
System.out.println
have void
higher
12. 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.
assignment
string literal
encapsulation
constructors
13. Variables and constants can be referenced in any method of the class by declaring at the _________
java.util class libary
signed
class level
method
14. An object in Java - defined by the class String
inheritance
initialize
byte to short
character string
15. 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 -
variable
class
NumberFormat class
visibility modifiers
16. An object should be self-governing - meaning that the instance data of an object should be modified only by that object.
literal
accessor method
String concat (String str)
self-governing
17. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
instance data
wrapper class
String findInLine (String pattern)
accessor method
18. 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.
instance variable
visibility modifiers
Scanner class
double
19. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
Scanner scan=new Scanner (System.in);
String replace (char oldChar - char newChar)
state of an object
import java.util*
20. A set of classes that supports the development of programs
class library
String findInLine (String pattern)
parameter
char charAt (int index)
21. Returns a string containing the specified number formatted according to this object's pattern.
boolean equals (String str)
String format (double number)
method
String next( )
22. Returns the number of characters in this stirng.
int length( )
higher
NumberFormat class
class
23. Four integer data types: byte - short - int - _____
parentheses
method invocation
promotion
long
24. After an object has been instantiated - we set the _________ to access its methods
packages
boolean hasNext( )
String next( )
dot operator
25. Part of the java.util class; picks a number at random out of a range of values.
Random class
String replace (char oldChar - char newChar)
primitive variables
java.lang package
26. A null reference indicates that a variable does not refer to an object
delimiters
String findInLine (String pattern)
boolean equalsIgnoreCase (String str)
null
27. 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
floating point numbers
method invocation
flow of control
Scanner class
28. Returns the next input token as the indicated type.
called method
byte nextByte( )
Random class
visibility modifiers
29. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String replace (char oldChar - char newChar)
support methods
flow of control
parameter
30. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
postfix form
pointer
parentheses
boolean value
31. The names of the parameters in the header of the method declaration
assignment conversion
formal parameters
scope
private
32. 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
pointer
public
higher
import java.util*
33. 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
behaviors of an object
variable declaration
string name;
wrapper class
34. 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.
conditionals
parameter list
operations
instance data
35. Every object has two things: a state and a _____ of behaviors
set
variable declaration
num=Integer.parseInt(str);
self-governing
36. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
method invocation
the "import" declaration
NumberFormat class
a constructor
37. Returns a new string identical to this string except all lowercase letters are converted to their uppercase equivalent.
operations
wrapper class
class
String toUpperCase ( )
38. Also called a selection statement b/c it allows us to choose which statement will be executed next.
conditional statement
class library
have void
String replace (char oldChar - char newChar)
39. ______________ operators have higher precedence
arithmetic
java.lang package
data values
delimiters
40. Returns a new string consisting of this string concatenated with str.
private
instance data
String toLowerCase ( )
String concat (String str)
41. Constructor: creates a new string object with the same characters as str.
String (String str)
String format (double number)
underscores
called method
42. Automatically imported because they are fundamental and can be thought of as basic extensions to the language.
byte nextByte( )
java.lang package
variable declaration
encapsulation of an object
43. 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
aliases
variable
promotion
attributes of an object
44. A value that is passed into a method when it is invoked
parameter
local data
public
String object
45. 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
floating point numbers
conditional statement
String (String str)
46. Attempts to find the next occurence of the specified pattern - ignoring delimiters
self-governing
String concat (String str)
String findInLine (String pattern)
private
47. Instance data should be defined with what________ visibility
static
String nextLine( )
private
actual parameters
48. 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.
int length( )
data values
enumerated type
postfix form
49. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
service methods
instance variable
static
import java.util*
50. 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 name
scope
null
pointer