Share on Google+Share on Google+

SCJP Module-3 Question-6

This program will test your understanding about Inner Class and Outer Class and help you for preparation SCJP exam.

Given below the sample code :

public class SuperClass {
private static final int ID = 3;
private String name;

public void SetMethod(final int nn) {
int number = 11;
class ClassInner {
void Display() {
System.out.println("OUTPUT= " + **);
new ClassInner().Display();

What should be in place of "**" , so that it can run without any error ?

A.  The int ID
B.  The String
C.  The int nn
D.  The int number

Answer :

(A),(B) & (C)



Posted on: July 12, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.


Advertisement null