Home > DeveloperSection > Interviews > Can an Interface have an inner class?

Posted on    May-21-2011 2:13 AM

 Java Java 
Ratings:
 1 Answer(s)
  909  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Points:2550
Posted on    May-21-2011 12:00 AM

 Yes.

public interface abc
{
static int i=0; void dd();
class a1
{
a1()
{
int j;
System.out.println("inside");
};
public static void main(String a1[])
{
System.out.println("in interfia");
}
}
}


Don't want to miss updates? Please click the below button!

Follow MindStick