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

What are the object and class classes used for?

787


What is binary search in java?

786


Is hashset sorted in java?

864


How do you override a variable in java?

730


What is outofmemoryerror in java?

760


What is the use of runnable interface?

836


Is java jre still free?

716


What is collection class in java?

725


When we serialize an object does the serialization mechanism saves its references too?

724


Why is multiple inheritance not supported in java?

769


How hashmap works in java?

796


What is a dynamic array java?

718


If an object reference is set to null, will the garbage collector immediately free the memory held by that object?

883


Who is the owner of java?

757


Can a class be defined inside an interface?

762