How to run a class file?

Following example shows 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.

No comments: