You can compile multiple files by hand although thats not very useful.

javac Program1.java Program2.java Program3.java

Instead refer to build-system