Programming Languages Java Objective
Mar 01, 2013

Which constructs an anonymous inner class instance?

Choose the correct answer:
A) Runnable r = new Runnable() { };
B) Runnable r = new Runnable(public void run() { });
C) Runnable r = new Runnable { public void run(){}};
D) System.out.println(new Runnable() {public void run() { }})
Detailed Explanation

Option D is the right answer.

 

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback