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

Explain restrictions for using anonymous inner classes?

846


What is tree node in java?

736


What does jenkins do?

690


Can a constructor call another constructor?

773


Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.

1773


Can we sort list in java?

806


what is heap memory?

872


What is encapsulation in java?

863


Describe string intern() methodology

818


What is the right data type to represent a price in java?

763


What is immutable in java?

792


What is the difference between variable & constant?

781


Can extern variables be initialized?

694


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

2080


What is close method? How it's different from Finalize & Dispose?

810