In this article, how to write First/Sample Program using Java is explained in detail. We can write a simple java program easily after installing the JDK.
It's time to write your first program! The following instructions are for users of Windows vista and Windows XP. To create a simple java program, you need to create a class that contains the main method. Your first application will simply display the greeting "Hello world!".
To create the First/Sample Program using Java, follow the program. (From topic how to write First/Sample Program using Java)
Ex:1
//program related to First/Sample Program using Java.
class sample{
Public static void main(String args[]){
System.out.println("Hello world!.");