What is the use of static keyword in "public static void
main()"
Answer Posted / rozer willis
static keyword makes the main function static.And the
advantage to make it static is that it can call other
static methods of the sane class just by their names i.e.no
need to create object.And the static method cant be
override so it prevent the main method from onerriding.
| Is This Answer Correct ? | 34 Yes | 4 No |
Post New Answer View All Answers
how we can make a read-only class in java?
Can you achieve runtime polymorphism by data members?
What is the static keyword?
Can we serialize singleton class?
What is general methodology?
What is the purpose of a volatile variable?
What is the default value of an object reference declared as an instance variable?
What's the default access specifier for variables and methods of a class?
Is there any difference between nested classes and inner classes?
What is tree in java?
Is stringwriter thread safe?
Write a program in java to find the maximum and minimum value node from a circular linked list.
What is java regex?
How to convert string to char and vice versa?
Can constructor be inherited?