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
How to compare strings in java?
How does multithreading take place on a computer with a single cpu?
What is the right data type to represent a price in java?
Explain about the interpreter in java?
Does java support multiple inheritances?
What all methods are used to prevent thread execution ?
How static variable work in java?
Is object a data type?
How do I write a self declaration?
Can we able to pass objects as an arguments in java?
What is a war file?
what is the constructor and how many types of constructors are used in java?
What is a method in coding?
What is a conditional statement explain with example?
Explain the use of sublass in a java program?