Need to use public,static keywords in main function?
Answer Posted / aravinda reddy
1) Public access modifier specifies class declared can be
accesses from anywhere
2) where as static refers with out creating instance of the
class JVM should access the main class while executing.
3) void specified main function should not return any value
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is an interface in java? Explain
What is variable declaration and definition?
Is singleton a bad practice?
What is independent and dependent variables in research?
Explain notify() method of object class ?
What is use of a abstract variable?
What are meta-annotations?
Where is core java used?
What if constructor is protected in java?
Explain the meaning of java applet.
What is difference between next () and nextline () in java?
What is double in java?
What are multiple inheritances?
What is singleton class in ruby?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?