Answer Posted / amit
look guys,we use main() method inside java cause whenever we
compile .java file then jvm call classname.main() first
without make any object.main method must be public and static
cause public for wide accessing and jvm call main() without
creating any object its only possible when main() is static
method.and all the argument taken by main in form of string
thats why we write as.......
public static void main(String args[])
it canbe
public final static void main(String args[])
Is This Answer Correct ? | 24 Yes | 0 No |
Post New Answer View All Answers
Why are some of the class and element names counter-intuitive?
What is the difference between a menuitem and a checkboxmenuitem?
Which component handles cluster communication in jboss?
What are the different class loaders used by jvm?
how i secure my site with the https protocol.what are the steps?
cud u help me ... i am struggling with this question... to find all the subsets of a given set for ex.... a,,b,c shud give all the subsets.... i gt the program in c bt nt able to get it in java..... help needed ..
Explain the different types of memory used by jvm?
What is the relationship between an event-listener interface and an event-adapter class?
difference between ejb,struts,hibernate,spring and jsp
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.
What is the difference between long.class and long.type?
what are getters and setters in Java with examples?
What is the purpose of the notifyall() method?
What do you mean by Socket Programming?
What is the difference between RMI registry and OS Agent?