So, have a Basic Example of JAVA Program :
We need two software to generate a Java Program->
- First one is the Java SE Development Kit
- The second one is a Text Editor
- For this example, we’ll use a notepad.
- A notepad is a simple editor involved with the Windows Operating System.Â
- We can use another text editor like NotePad++
Here are the few steps to the Compile and Run Java program:
Step 1)Â Go to the Start menu and Open notepad by selecting Programs > Accessories > Notepad.
Step 2)Â Make a code for the first basic program.
- Let’s declare a class with the name Test.
- Then declare the main method, i.e., public static void main(String args[]){
- Now write System.out.println (“First Program”);Â
- The above line displays the text First Program.
Step 3) Now, save the file as Basicprogram.java and make sure to save the file in the working folder C:\workspace
Step 4)Â Now, go and open the command prompt.Â
              Go to Directory path C:\workspace.Â
 Then, compile the above code using the command,
Step 5) If you look in your working folder, you can see that a file named FirstProgram.class has been created.
Step 6) Now, execute the code and enter the java command, followed by the class name.
        So, the expected output should be the ‘First Program.’
Note:  As we say, Java is case sensitive Programming language.Â
So, all the code, commands, and file names should are used in the consistent casing.
Let’s have an example on case sensitive:
int demo=1;
int DEMO=1;
*These are completely different variables.
 Step 7) Now, copy the code and paste the same code in IDE like we say Eclipse the compiling and execution is done with the click of a button.