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 the difference between && and & in java?
What is a final class ?
How can an object be unreferenced?
Which api is provided by java for operations on set of objects?
What is the purpose of object oriented programming?
What is %02d?
Tell me about different OOPS concepts.
How many bytes is a string java?
What is difference between module and function?
What is the purpose of the file class in java programming?
What are the ways in which a thread can enter the waiting state?
Can we declare array without size in java?
Can you change array size in java?
What class allows you to read objects directly from a stream?
How many wrapper classes are there in java?