Simple Program in Java Language
import java.io.*;
class welcome
{
public static void main(String aa[])
{
System.out.println(“Welcome in Java programming language”);
System.out.println(“Java is developed by James Gosling”);
System.out.println(“This language was initially called as Oak”);
}
}
How to run a Java Program
Compile and execute :
- First, we write the source code of the program in Java using an editor like Notepad.
2. Save this file as welcome.java.
3. Write these commands on the prompt to run the Java program like below.
To compile–javac welcome.java
To execute:–java welcome
