javaclass

How come my Java class creates multiple .class files when compiled?


I am creating a simple text editor program with Sublime Text on Mac and when I am compiling via the command line it produces 6 .class files.

I am using the following command in the terminal to compile my class.

javac Notepad.java

The console log is shown in the image below...

Console Log

Does anyone know why it could be producing multiple .class files? And the weird thing is I can delete them and then use java Notepad and it still runs perfectly... Why does Java even create these? I'm sure I am doing something stupid.

Rather than post the full code, here is my git repository.


Solution

  • Those are names given to inner classes -- it does not mean you are doing anything wrong, or that there's anything wrong with the code.