info@tutsfinder.in



In this Segment, you will be understood how java program works and what are the things that user has to focus on.

User needs Java Development Kit, To download jdk install jdk

We can create Java program using Notepad -

• First user has to open notepad

• Then type the following code



public class FirstProgram
{
public static void main(String[] args){
System.out.print(“This is my First Program”);
      }
}



• Save the file as FirstProgram.java.

Note: File name is always same as class name and it is case sensitive.


• Now open your cmd and set the directory path where your java program is saved and run the following commands:
    javac FirstProgram.java
    java FirstProgram

Output:
This is my First Program