198k views
1 vote
Which command compiles the Java source code file Welcome.java?

cd Welcome.java
javac Welcome.java
java Welcome.java
compile Welcome.java

User Komelgman
by
8.2k points

1 Answer

3 votes

Answer:

javac Welcome.java

Step-by-step explanation:

In order to the file to compile with the default compiler in the JDK, the instruction must be of the form:

javac filename

(Note: the filename with the .java extension)

User Vasiliy Artamonov
by
8.3k points