0
What's the command in cmd to compile and execute a java program??
2 Answers
+ 2
compile to bytecode using javac, and execute using java
javac (java file)
java (classname)
+ 1
if you have set path to java bin, then eg
javac -d .class Main.java
java -cp .class Main
here Main.java is example of your code file name