Why do we use public static with the main function in Java?
Answer Posted / rameshreddy.k
As we know public means we can access the method from
anywhere. in a java we want call method by using class
object. But main() is also method .that main() is there one
class but jVM execute program trough main() method with out
creating object main() method call thats way we use public
static the main function
thanks& regargs
RAMESH
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is the point of java?
How to split arraylist elements in java?
Is heap stored in ram?
Which sorting algorithm is in place?
How the metacharacters are different from the ordinary characters?
Explain what pure virtual function is?
How do singleton patterns work?
What is the difference between static class and normal class?
What is difference between path and classpath in java?
What is time complexity algorithm?
What is a variable and constant?
What are thread local variables?
Why array is used in java?
What is the relationship between class and object?
What is the tradeoff between using an unordered array versus an ordered array?