Hi,
K&B Pg 666 {Inner classes quiz} question #3
Given,
public interface Runnable{ void run();}
Which construts a anonymous inner class instance{Choose all that apply}
A. Runnable run = new Runnable() {}; // Incorrect because the anonymouse inner class implementer of Runnable does not implement run().
B. Runnable run = new Runnable(public void run()

// Incorrect syntax
C. Runnable run = new Runnable {public void run();} // Incorrect syntax
D. Runnable run = new Runnable() {public void run();} // IS CORRECT. K&B says its incoorect syntax. K&B Errata on this site does not talk anything about Pg 666.
E. System.out.println(new Runnable() {public void run();}); // Correct. K&B also says its correct.
F. System.out.println(new Runnable {public void run();}); //Incorrect syntax.
Hence the answer to this question should be D & E. But K&B says 'E'.
Correct me!
Thanks
Deepak