What is the use of static keyword in "public static void
main()"

Answer Posted / subha, bijji

a static is a method that is called with out using object.
we can call a static method is like classname.method name.
it is very usefuul in public static void main()

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can singleton class be inherited in java?

520


Can we override private methods?

549


What is array sorting in java?

557


What methods are used to get and set the text label displayed by a button object?

558


What are user defined exceptions?

593






What are the topics in core java?

539


What are aggregate functions explain with examples?

528


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

565


What are different types of inner classes ?

567


Mention a package that is used for linked list class in java.

531


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

597


Can main() method in java can return any data?

653


Why can't we override private static methods?

523


What are the new features in java 8?

576


Why heap memory is called heap?

595