Why do we use public static with the main function in Java?
Answer Posted / bheemrao
if we don't use public in main method jvm is looked for main
method but does not found.so run time error will occurred
"main() method must be declared as public". why its static
means in java we can execute methods with object.if we use
static it will execute without object.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Can we have try block without catch block?
What is the difference between an array and an array list?
What is the abstraction?
Can inner class final?
How do you invoke a method?
What is the default value of byte datatype in java?
What is the use of static class?
What is procedure writing?
Is a string literal?
What is the difference between hashset and treeset in java?
I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in
When should you use arraylist and when should you use linkedlist?
What is a qms manual?
Explain reverse a linked list iterative solution in java?
Can a variable be local and static at the same time?