Articles → Java → Create compile and execute your first java program

Create compile and execute your first java program






















Software Requirement







Prerequisite knowledge





Installation of JDK





Create your first program








class MainClass {
  public static void main(String args[]) {
    System.out.println("Hello World");
  }
}





Code explanation











Compile your program








javac  c:\files\MainClass.java









Execute your program










java MainClass







Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, September 10, 2012

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250