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
What is a line break example?
Write a function to find out longest palindrome in a given string?
What is the file extension for java?
What is the difference between length and length() method in java?
What are the restrictions imposed on method overriding?
What are filterstreams?
Can a static class have a constructor?
How many bytes is a char in java?
Can a abstract class be defined without any abstract methods?
What does nullpointerexception mean?
What is substring in java?
Can an integer be null java?
What is split return?
When is the finally clause of a try-catch-finally statement executed?
Can a final variable be manipulated in java?