views:

21

answers:

1

Hi.

I created a Swing GUI using netbeans, and when I try to manually do the following:

# ls
myProg.form     myProg.java

# javac myProg.java
# ls
myProg$1.class  myProg$2.class myProg$3.class myProg$4.class myProg$5.class myProg$6.class myProg.class myProg.form myProg.java

It created those extra classes. Why is this happening? Is this a fluke? I tried Googling but no answers have shown up.

Thanks.

Carlo

+1  A: 

Those extra classes are anonymous inner classes used by your Swing GUI. The java compiler names anonymous inner classes in such a manner.

Rahul
Exactly right. Nothing to be afraid of
I82Much