SCJP Module-3 Question-6


 

SCJP Module-3 Question-6

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

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)

 

Ads