Need to use public,static keywords in main function?
Answer Posted / anjani kumar jha
public is used because from anywhere u r able to call ur
main method
static-static is the entry point of main function which is
executing by jvm(at run time) in other word signature of
the main function.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
What is the final access modifier in java?
Explain about assignment statement?
What are the difference between string, string builder, and string buffer in java?
What does the “final” keyword mean in front of a variable? A method? A class?
Can a class with private constructor be extended?
Can we override the private methods?
What are the advantages of defining packages in java?
What is meant by method overriding?
Can we define private and protected modifiers for the members in interfaces?
Which class is the superclass of all classes?
Is alive in java?
What are the advantages and disadvantages of reference counting in garbage collection?
Explain about serializable interface in java?
What are pass by reference and pass by value?
How many static init can you have?