First Program In Java
Before developing first Java program , we need to have below things set.
1) JDK Installation
Download and install the JDK using below link
Java download link
2) Set the jdk path
Now write the Java program either in notepad or in eclipse IDE.
- class FirstJavaProgram{
- public static void main(String args[]){
- System.out.println("Welcome to Java");
- }
- }
class FirstJavaProgram{ public static void main(String args[]){ System.out.println("Welcome to Java"); } }
Save it as FirstJavaProgram.java
Compile it using below command in command prompt
Javac
FirstJavaProgram.java
Now run it using below command
Java
FirstJavaProgram