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 relationship between clipping and repainting under awt?
What are runtime exceptions?
What do you mean by of string::valueof expression in java 8?
Why map is used in java?
Which java version is latest?
What is the difference between jdk and jre?
Write a program to check for a prime number in java?
What are the legal operands of the instanceof operator?
What do you mean by singleton class in java?
What is the new line character?
How many bytes is a url?
How do you check if a string contains only numeric digits?
Can you give few examples of final classes defined in java api?
what is thread? : Java thread
What is the default execution method in java?