J2SE Platform: Development Kits & General Programming
Tech Tips Programming Quiz
By Monica Pawlan
April 1998
Back to Quiz
- Why are Java ARchive (JAR) files important?
Answer (B): They bundle .class files and optimize applet loading.
- Which code segment ensures garbage
collection happens in a timely manner?
Answer (A): Nullifying an object reference facilitates garbage collection.
public Object pop()
{
Object p = stk[stkp];
stk[stkp--] = null;>
return p;
}
- What is the purpose of the toolkit in
the Abstract Window Toolkit (AWT)?
Answer (C): An interface between the abstract window layer and windowing implementation.
- What is an interface class?
A collection of method declarations and constant values.
- Vertical and horizontal scroll bar increments are how many units by default?
Answer (D): 1 unit.
- Reflection (introspection)
is querying a class about its properties, and operating on methods and
fields by the name for a given object instance. Why is reflection
possible in the Java language?
Answer (A): Late binding.
- The StringBuffer class supports what type of strings?
Answer (A): Mutable (changeable).
- Why does an Assert class that checks program assertions need several
implementations of its assert method?
Answer (B):The Java language has tight type checking.
You need an assert implementation for booleans, byte, char, short, int, long,
float, double, and all reference types.
- What is serialization?
Answer (D): A way to convert objects into a stream of bytes.
- What is javap?
Answer (C): A tool for generating information on .class files
You missed 0
Your score is 100 percent.
© 1994-2005 Sun Microsystems, Inc.