Need to use public,static keywords in main function?
Answer Posted / suresh
Main method is called by jvm...
jvm is out side the class
so main method must be pulic
then only jvm can access.
No instance of the class is needed to
execute the static method.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can a function return a function?
can rmi and corba based applications interact ?
What are facelets templates?
Why do we use variables?
What java is used for?
State some advantages of java?
What does arrays sort do in java?
How objects of a class are created if no constructor is defined in the class?
What is the difference between Array and Hash Table?
Where pragma is used?
What is a method header?
write a program that list all permutations of ABCDEF in which A appears before B?
How do you control extraneous variables?
What is java algorithm?
Why is flag used in java?