Quiz #3
Wednesday
With a piece of paper, write down your name and answers to the following questions.
Making an instance of one class a field in another class is called:
- Nesting
- Class Fielding
- Aggregation
- Concatenation
What
enummethod returns the position of anenumconstant in the declaration?positiontoStringlocationordinal
What is the name of the process, performed periodically by the JVM, that automatically removes unreferenced objects from memory?
- Memory Cleansing
- Memory Deallocation
- Garbage Collection
- Object Expungement
Is it necessary to override the
toStringmethod of anenumclass in order to obtain a string representation of the name of anenumconstant?Answer: No, it is not necessary.
What is the output of the following program?
public class Program { public static void main(String[] args) { MysteriousClass obj = new MysteriousClass(); obj.mysteriousPrint("def"); } } class MysteriousClass { private String arg = "abc"; public void mysteriousPrint(String arg) { System.out.println(arg); System.out.println(this.arg); } }Answer:
def
abc
Student Performance and Statistics
A histogram of student performance on percentage grades for Quiz 3 on Wednesday.
A table showing the average performance for each question in Quiz 3 on Wednesday.