Friday, August 6, 2010

Inner Classes:

Courtesy of SCJP Sun® Certified Programmer for Java™ 6 Study Guide Exam (310-065) (9780071591065)
Chapter 8, Question 7

Which, inserted independently at line 6, compile and produce the output “spooky”? (Choose all that apply.)

A. Sanctum s = Sanctum();
B. c.Sanctum s = Sanctum();
C. c.Sanctum s = Sanctum();
D. Cathedral.Sanctum s = Sanctum();
E. Cathedral.Sanctum s = Sanctum();

Option D is the correct syntax to instantiate inner class Sanctum.

No comments:

Post a Comment