Java Examples - Run a class file

Advertisements


Problem Description:

How to run a class file?

Solution:

Following example demonstrates how to run a class file from command prompt using java command.

c:\jdk\demoapp>java First 

Result:

The above code sample will produce the following result.

Demo application executed.


Advertisements
Advertisements