It looks like a top level interface cannot be private or protected.
I modified your code as below and it works just fine
public class AQuestion {
private interface xint{
void someMethod();
}
class newc implements xint{
public void someMethod(){
System.out.println("from the implemented method");
}
}
public static void main(
String args[]){
AQuestion.newc aq = new AQuestion().new newc();
aq.someMethod();
}
}