Why main method is declared public static in Java

Tutorials Shared by the Internet Community

Advertisements


Synopsis

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

Statistics

  • Total Hits - 29033

  • Total Votes - 184 votes

  • Vote Up - 96 votes

  • Vote Down - 88 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

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

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 ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements