Why do we use public static with the main function in Java?
Answer Posted / saikat chowdhury
'public' keyword is an access specifier.It means you can access anywhere of the program using this specifier.When we use in the main function it can be access outside of the(class, package,subclass.'Static' also a keyword.When we use this in the main function that means you do not need to create the object of static.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is mean by collections in java?
What is an exception? difference between Checked and Unchecked exception in Java
if u open login & logout ,how can udisplay the timelogin & logout members ?
Can we sort set in java?
Can abstract class have private constructor?
What is jvm? How its run?
What do you mean by light weight and heavy weight components?
What are the application of stack?
What is the difference between && and & in java?
What is hashset in java?
Explain the difference between runnable and callable interface in java?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?
What are kinds of processors?
What is an infinite loop in java? Explain with an example.
What are the important features of Java 9 release?