I have a number of .java classes compiled with Eclipse and over in the /bin directory I see that not only do I have various .class files corresponding to my Java classes but also a few with a dollar sign in the file name.
Example: I have a class called RangeFinder and in the /bin I see a RangeFinder.class and also a RangeFinder$1.class.
What is the significance of the latter?
(I am on Ubuntu and I am using Eclipse EE Indigo.)
These are anonymous inner classes in bytecode form. The compiler gives them numerical names starting with
1(it is not allowed in Java to have a class name starting with a number, but it is possible in the bytecode, so the compiler does it to avoid name clashes, I guess). Normal (named) inner classes are named likeOuterType$InnerType.class.