Java Examples - Compile a Java file

Advertisements


Problem Description:

How to compile a java file?

Solution:

Following example demonstrates how to compile a java file using javac command.

c:\jdk\demoapp> javac First.java 

Result:

The above code sample will produce the following result.

First.java compile successfully.


Advertisements
Advertisements