-3

I was trying to compile a huge open source Java project, and after building it with MAVEN I saw that some folders contain extra classes that didn't exist before in the corresponding folder. In other words, after building the Java project, more .class files are generated in some folders than the .java files that existed before compiling.

Can you explain the reason? Is it normal? What are the practices that lead to such results and change the structure of the project?

David Guyon
  • 2,759
  • 1
  • 28
  • 40
dimitrisr
  • 185
  • 1
  • 1
  • 6
  • Are you talking about when you get stuff like [filename]$1.class, [filename]$2.class? If so, the question is answered [here](http://stackoverflow.com/questions/1075207/what-are-the-1-in-class-file). – Frank Jan 28 '16 at 12:50
  • Anders Ankan Gardenas is the man. Next time when downvoting, say why. Thank you. – dimitrisr Jan 28 '16 at 14:10

1 Answers1

0

All nested classes will have their own .class file, resulting in more .class file than .java files.