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

Answer Posted / p.r.gupta

the use of static is for static methods we need not to
create any object,so internally jvm calls like classname.method

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which class is used by server applications to obtain a port and listen for client requests?

493


What are the ways to instantiate the class class?

602


What are the types of casting?

597


How would you format a date in java? I.e. In the ddmmyyy format?

778


How java uses the string and stringbuffer classes?

518






What is meant by method overriding?

547


Can we use this () and super () in a method?

533


What is function and method in java?

525


Can a method be static?

528


What is diamond operator in java?

503


What are mutable classes?

525


How many types of methods are there?

550


Explain the difference between collection api and stream api in java8?

511


What is scope & storage allocation of static, local and register variables? Explain with an example.

568


How does arraylist size increase in java?

531