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
How to sort an unsorted array in java?
What do you mean by an object in java?
What are synchronized methods and synchronized statements in java programming?
What are exception handling keywords in java?
What is an accessor?
what is mutual exclusion? : Java thread
Is string is a class in java?
What is nullpointerexception in java?
What is the difference between yielding and sleeping in java programming?
What is the point of java?
What loop means?
Write a program to find the greatest of three numbers in java?
Is a boolean 1 bit?
What is collections framework?
Can abstract class have private constructor?