Why is the main method static in Java?
Answer / nashiinformaticssolutions
Java's main() function is static by default, allowing the compiler to call it either before or after creating a class object. The main () function is where the compiler begins programme execution in every Java programme. Thus, the main () method needs to be called by the compiler. If the main () method is permitted to be non-static, the JVM must instantiate its class when calling the function.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain, why the constructor is required in implemented class?
What is int argc char * argv?
What is java string pool?
Enlist diffrent types of inheritance supported by java?
What is the method overriding?
What is public static void main?
Can you run java program without main method?
What is math in java?
What is the use of string and stringbuffer?
What is purpose of find feature?
How do you convert string to int in java?
How do you declare a string variable?