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 the next input token as a character string.
postfix form
character string
String next( )
state of an object
2. Eight primitive data types: four subsets of integers - two subsets of ________ - a character data type - and a boolean data type
floating point numbers
static int parseInt (String str)
primitive variables
method invocation
3. The Scanner class is part of ___________________
class
java.util class libary
instantiation
not possible
4. Returns a new string that is identical with this string except that every occurrence of oldChar is replaed by newChar
byte nextByte( )
String replace (char oldChar - char newChar)
Understanding
int length( )
5. 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.
byte to short
support methods
string literal
visibility modifiers
6. Constructor: creates a new pseudorandom number generator.
Random ( )
formal parameters
arithmetic
String concat (String str)
7. ______________ operators have higher precedence
arithmetic
prefix form
boolean nextBoolean( )
flow of control
8. 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;
String concat (String str)
int length( )
null
9. The names of the parameters in the header of the method declaration
polymorphism
formal parameters
self-governing
constants
10. format for constants: all upper-case; separated by ________
underscores
String findInLine (String pattern)
state of an object
String toUpperCase ( )
11. 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.
RH
inheritance
polymorphism
parameter
12. Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
formal parameters
class level
String toLowerCase ( )
accessor method
13. A ________________ is immutable.
Scanner scan=new Scanner (System.in);
String object
local data
instance data
14. Specifies the packages and classes that will be used in a program so that the fully qualified name is not necessary with each reference.
int compareTo (String str)
Random class
the "import" declaration
Scanner scan=new Scanner (System.in);
15. Elements of input
arithmetic
String concat (String str)
tokens
actual parameters
16. The only purpose of a private method is to help other methods of the class do their job. they are referred to as _________
String toLowerCase ( )
parameter list
static int parseInt (String str)
support methods
17. 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
operations
wrapper class
reserved word void
packages
18. Attempts to find the next occurence of the specified pattern - ignoring delimiters
mutator method
private
String findInLine (String pattern)
higher
19. Variables that don't contain any data
set
byte to short
service methods
uninitialized variables
20. 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.
parameter list
System.out.println
variable name
instantiation
21. Examples of Scanner ________: Scanner (InputStream source) - Scanner(File source) - Scanner(String source)
conditional statement
class
constructors
Random ( )
22. We use an object when we have a _________ to it
reference
pointer
Scanner class
instance data
23. 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
System.out.println
inheritance
scope
24. 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
return statement
a constructor
the "import" declaration
variable declaration
25. Changes a particular value - e.g.setX - where X is the value they are setting.
mutator method
parentheses
encapsulation
return statement
26. If a class contains the _________ height - it should also probably contain the methods: getHeight and setHeight
instance variable
support methods
flow of control
String next( )
27. 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.
self-governing
encapsulation
higher
static int parseInt (String str)
28. This declaration creates a Scanner object that reads input from the keyboard
Scanner scan=new Scanner (System.in);
formal parameters
import java.util*
string literal
29. Includes the type of teh return value - the method name - and the list of parameters that the method accepts.
self-governing
header of a method
casting
scope
30. The classes of the Java standard class library are grouped into __________.
formal parameters
packages
byte to short
num=Integer.parseInt(str);
31. Provides read-only access to a particular value - e.g. getX where X is the value to which it provides access.
byte nextByte( )
accessor method
expression
String substring (int offset - int endIndex)
32. 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
local data
encapsulation
boolean hasNext( )
aliases
33. 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
boolean value
scope
method invocation
byte to short
34. The fundamental characteristics that currently define the object. for example - part of a bank account's state is its current balance.
static int parseInt (String str)
String concat (String str)
java.lang package
state of an object
35. Returns true if this string contains the same characters as str (without regard to case) and false otherwise.
boolean value
signed
reserved word void
boolean equalsIgnoreCase (String str)
36. A class usually provides services to access and modify __________
reserved word void
String concat (String str)
long
data values
37. New memory space is reserved for that variable every time an instance of the class that is created.
reference
accessor method
a constructor
instance data
38. Behaviors associated with a bank account (which include the ability to make deposits and withdrawals)
boolean equals (String str)
String toLowerCase ( )
behaviors of an object
String nextLine( )
39. Even though a method may not take parameters - _________ are still necessary to indicate that a method is being invoked
a constructor
Scanner class
class library
parentheses
40. Declared in a class but not inside any particular method
Scanner scan=new Scanner (System.in);
tokens
method declaration
instance data
41. 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.
literal
polymorphism
enumerated type
have void
42. Returns the next input token as the indicated type.
instance data
arithmetic
boolean nextBoolean( )
visibility modifiers
43. All numeric types are _______ - meaning both positive and negative values can be stored in them
postfix form
import java.util*
signed
the DecimalFormat class
44. The one that is invoked
postfix form
local data
called method
int length( )
45. Provides generic formatting capabilities for numbers; you don't instantiate a NumberFormat object by using the "new" operator.
NumberFormat class
behaviors of an object
signed
prefix form
46. The order in which statements are executed in a running program
flow of control
promotion
class library
the DecimalFormat class
47. Constants are ______ because the can't be changed once you use the final modifier
public
aliases
java.lang package
null
48. When a variable is declared inside a method
num=Integer.parseInt(str);
data values
have void
local data
49. Boolean type conversions are ___________
not possible
pointer
java.lang package
a constructor
50. Expressed in a Java program with single quotes
primitive variables
assignment
a constructor
character literal