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 mutable object and immutable object?
What is the difference between a vector & an array list?
What is an example of procedure?
what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????
What is a lock or purpose of locks in java?
What is class forname?
What is another word for methodology?
How many bytes are a float?
What is the purpose of javac exe?
What is collection class in java? List down its methods and interfaces.
Define locale.
What is the static method?
What is tcp and udp?
What is the difference between jdk, jre, and jvm?
Can we use string in switch case in java?