If I have an inner class, like this:
public class Test
{
public class Inner
{
// code ...
}
public static void main(String[] args)
to build up on hhafez : SomeClass$1.class represents anonymous inner classes. An example of such a class would be
public class Foo{
public void printMe(){
System.out.println("redefine me!");
}
}
public class Bar {
public void printMe() {
Foo f = new Foo() {
public void printMe() {
System.out.println("defined");
}
};
f.printMe();
}
}
From a normal Main, if you called new Bar().printMe it would print "defined" and in the compilation directory you will find Bar1.class
this section in the above code :
Foo f = new Foo() {
public void printMe() {
System.out.println("defined");
}
};
is called an anonymous inner class.