My professor asked us to create a Java program that would be able to run in command prompt but could also be opened using NetBeans.
The program is about using the di
Create a folder somewhere, say C:\myjava. Copy your .java source files from wherever netbeans saves them to your C:\java for example. Open each of these .java files you have just pasted and delete the line that states the package e.g package myjava. Compile using javac e.g. javac c:\myjava\MyJava.java. Then run it as in, java c:\myjava\MyJava