I found the following example in one of the java forum.
interface employee{
class Role{
public String rollname;
public int roleId;
public Object person;
}
Role getRole();
// other methods
}
I have executed the above code snippet and it is compiling successfully. Which means we can have a class inside an interface.
My question is what is the use of having such classes? Is it any design pattern?