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
Can we override the overloaded method?
What is temp in java?
What is the difference between static binding and dynamic binding?
What are the characteristics of java?
What are static blocks and static initalizers in java ?
Which is best ide for java?
What is int argc char * argv?
how to create multithreaded program? : Java thread
What are the two types of java programming?
Why object class is super class for every class in java?
What is a numeric digit?
What is ide with example?
What restrictions are placed on method overloading?
Can a final variable be null?
Is null an object java?