Ok, this is really weird. I wrote some codes a day ago, and then edited the codes. Then after hours and hours of editing and rewriting and introducing new classes, I ran the codes, but then I go a response from a "System.out.println()" line that I had long removed. Basically, netbeans seems to be running a much older build of my codes. I've cleaned and re-built my codes and still nothing. It keeps running old codes.
What's going on?
In Neatbeans by default settings will run your new code, even if you not build the project again (given that you have not modified the build settings). You can clean and Build the project again. If this also not works, just back up your codes and create a new project and include the source codes and run the project.
I had similar problem. I hit "Clean and Build", and then "Run", and it worked.
Well, Clean it well! Check for any read only folders in your bin that prevent overwriting of class file. Go to classes folder and check date and time class files got modified.
Maybe you can try to clear netbeans cache
- close NetBeans
- delete cache folder (/home/user/.cache/netbeans)
- open the project and wait for scanning project to finish