Answer Posted / 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 |
Post New Answer View All Answers
Can we declare main () method as non static?
Explain working of call by reference function invoking.
What is method in java ?
What are the advantages of java inner classes?
What are the differences between graph and tree?
What is the use of put method?
Does sprintf add a null terminator?
What is charat ()?
What is a module function?
What is boolean strategy?
which pattern is default in scanner package?
What is the use of static class?
What does it mean that a method or field is “static”?
Can a class be private or protected in java?
What is serialization in java?