Computer Science Canada Class$#.class . . . what does it mean? |
Author: | Aziz [ Thu Jul 27, 2006 12:43 pm ] | ||||
Post subject: | Class$#.class . . . what does it mean? | ||||
When I compile my main proggy, it compiles all the other class it uses, I get that, but why does it spit out several different .class files? The whole project uses these files:
Now, I compile HourRecorder.java, and it spits out:
My question is, why all the files? And do I need them all? All the $# files are 1KB (not the originals). I'm ... jarring...jarring?....anyways, im making a jar file and all these are going in, it's worked before and I'm not too concerned over a extra 10KB, but why? |
Author: | wtd [ Thu Jul 27, 2006 1:09 pm ] |
Post subject: | |
Post the code for HourRecorder.java. |
Author: | wtd [ Thu Jul 27, 2006 1:13 pm ] | ||
Post subject: | |||
Ah, found the source. You create anonymous inner classes in your class.
These have to be given some unique name, so they are. |
Author: | Aziz [ Thu Jul 27, 2006 2:20 pm ] |
Post subject: | |
Oh, okay, that makes sense. So, this is perfectly fine, right? Anonymous inner classes are good . . . right? |
Author: | wtd [ Thu Jul 27, 2006 4:16 pm ] |
Post subject: | |
It is fine. |