180k views
0 votes
Which command compiles the java source code file welcome.java?

User BBagi
by
8.0k points

1 Answer

5 votes
"javac <FILE NAME>" (unsurprisingly, stands for "java compile"), will compile your java source code in to a .java file, that can be run with the "java <FILE NAME>" command.

Make sure that your command prompt is set to the right destination when you run these commands, using "cd <DESTINATION>", otherwise they may be unable to find them in the incorrect destination.
User KeyKi
by
8.3k points