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 |
Write a program to find maximum and minimum number in array?
what release of java technology are currently available what do they contain?
Can you override a final method?
How many bits is a 64 bit byte?
What is the default size of set in java?
what is the use of reference variable
How do you make a thread in java?
Can an integer be null java?
Why scanner is used in java?
What are non-access modifiers?
How do you clear a method in java?
explain about method overloading and method overriding with difficult examples