Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

classname$1.class

Status
Not open for further replies.

NeilV

Programmer
Oct 14, 2002
117
GB
Hello...

Could someone explain to me why after compiling my Java program I get some class files that look like:

classname$x.class (where x is a number)

I need these for the program to run, but I have no idea how or why they are created or what they do...
they are all pretty small (only 1K)

Thanks in advance

Neil
 
If you had a class named Aaa which had an inner class named Bbb then you would get two .class files for compiling Aaa.java :

Aaa.class
Aaa$Bbb.class


The Aaa$1.class or Aaa$2.class etc are inner anonymous classes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top