why we write public static void main (String args[])
in core java plz explain briefly??????????????????

Answer Posted / sreenivas p

JVM looks for the main method(from where it starts
execution) with the same signature(public static void
main(String args[])) if it coud not find throws
NoSuchMethodError.
valid signatures are:
public static void man(String args[])
static public void main(String a[])
Invalid signatures
static void main()
public static main(String args[]) etc..[treats these
are all as general methods ]

Is This Answer Correct ?    16 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which variable is the independent variable?

526


Where are variables stored?

542


What is ‘has a’’ relationship in java?

714


Is string thread safe in java?

566


According to java operator precedence, which operator is considered to be with highest precedence?

589






How many types of interfaces are there?

566


Why do we declare a class static?

530


What does  mean in regex?

562


What are the features of java?

521


What happens to a static var that is defined within a method of a class?

541


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1352


explain multi-threading in java?

539


What is the difference between compare and compareto in java?

483


Which java ide is used the most?

499


What are the new features in java 8?

556