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 |
What is the java virtual machine?
Does isempty check for null?
What do you mean by flow of struts?
What are the fileinputstream and fileoutputstream?
What is ctrl m character?
How does compareto work in java?
What is the size of a string in java?
What is collections framework?
Can a function return a function?
Which browsers work with java?
What is a layout manager?
What is the difference between hashmap and hashtable? What is an interface?