CIT 270 Quiz 10 Key
1) An object that automatically executes one of its methods when a specific event occurs
is a(n) _?
2) What is a container?
A component that holds other components
3) What class must be extended to get a window?
CIT 270 Quiz 9
1. What is an exception?
An object that is generated as the result of an error or an unexpected
2. What exception is thrown if the Integer.parseInt method takes a string that is not
3. What happens if a
CIT 270 Quiz 8
1. What is inheritance?
Refers to the ability of a class to inherit all variables and methods of a
class by extending that class.
2. What is the difference between overridden and overloaded methods?
An overridden method has the same name an
CIT 270 Quiz 7
1. Assuming that you have a member variable of a class defined as a private static,
why would you need to make the get and set methods static?
Because we would have to create an object just to set the static
variable if the method wa
CIT 270 Quiz 6
1. Describe the relationship between a class and an object.
A class is the blueprint, or code, that describes and defines the object.
2. What is the purpose of set methods? Why dont we just let the users set the data
CIT 270 Quiz 5
1. What is the type of the argument for the main method?
2. Given the following declaration, what is the type of myString?
String myString = new String;
3. Given the following declaration, what is the value of
CIT 270 Quiz 4
1. What is the difference between counter-controlled repetition and sentinelcontrolled repetition?
Counter-controlled repetition uses a counter in the condition of the loop
to execute a task a certain number of times while sentinel-c
CIT 270 Quiz 3
1. What is the value of result at the end of this code segment?
int firstNum = 2;
int secondNum = 3;
int result = (firstNum < secondNum ? 3 : 4 );
2. What is the difference between the OR and the exclusive OR operators?
The OR eval
CIT 270 Quiz 2
1. Name one difference between an int and a float.
An int can only hold whole numbers, while a double can hold decimal
values and scientific notation.
2. What determines if division is integer or floating point?
CIT 270 Quiz 1 Key
1. Compiling a .java file produces a ._ file which consists of _.
bytecodes or virtual machine instructions
2. What is required to define a Java application?
A public class with a main method
3. List two advantages of Java.
* So I marked up this document with a few (too many) comments. It's just how I think when I program.
* Please note that the requirements may change in years to come, so this program may soon become useless to you.
* Good luck!