Why main method is declared public static in Java

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Why main method is declared public static in Java

Why Main method is declared public static void in Java is one of Classical interview questions in Java. Every Java Programmer knows that main method i
http://javarevisited.blogspot.com/2011/12/main-public-static-java-void-method-why.html
  • Total Hits: 24363

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 229 votes

  • Category: JAVA/Core JAVA

  • Submitted on: 2012-01-05 14:57:02

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Why Main method is declared public static void in Java is one of Classical interview questions in Java. Every Java Programmer knows that main method is entry point in Java program but only few knows the secret behind signature and syntax of main method in Java. most of Java developer don't really know why main is static , public or void in java and this article answers this questions and explains reason why main is static in Java    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 35.37%  81
 Two starsTwo star  Vote LeftVote MiddleVote Right 7.42%  17
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 9.17%  21
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 8.73%  20
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 39.3%  90

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements