To start with Java Program

Prerequisites for java Program

For executing any java program we require given things.

  • Introduce the JDK any form on the off chance that you don’t have introduced it.
  • Set way of the jdk/container registry.
  • Make the java program
  • Aggregate and run the java program

Ventures For aggregating and executing the java program

Java is exceptionally basic programming dialect first we compose a java program and spare it with system class name.

In underneath project we make a java program with “First” name so we spare this system with “” document name. We can spare our java program anyplace in our framework or PC.

Create First program


class First
public static void main(String[] args) 
System.out.println("Hello Java");                 
System.out.println("My First Java Program");                      


Compile and Execute Java Code

To compile:  javac
To execute:  java First


Hello Java
My First Java Program

Save Java Program


Compile Java Program



Note: Here Javac and Java are called devices or application programs or exe records created by sun miniaturized scale framework and supply as a piece of jdk 1.5/1.6/1.7 in receptacle organizer. Javac is utilized for accumulate the java system and java is utilized for run the java program.

Amid the system execution inside after strides will be happens.

Class loader subsystem loads or exchange the predefined class into fundamental memory(RAM) from optional memory(hard plate)

JVM takes the stacked class

JVM searches for fundamental technique in light of the fact that every last java program begin executing from principle() strategy.

Since fundamental() technique for java is static in nature, JVM call the principle() strategy as for stacked class (Example: First as First.main(- – ))

Note: A java project can contain any number of primary strategy yet JVM begin execution from that fundamental() technique which is taking cluster of object of String class.