why public static void main is used in Java

The Meaning of public static void main(String [] args) in Java

The main method in every Java program which is written as follows, but what does it mean? public static void main (String [] args) The method should be public. If you don’t specify the method as public, then the compiler will throw an error. Static should be used because when the main method is called […]

The Meaning of public static void main(String [] args) in Java Read More »