Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If the program contains the code:-

class X{

static void main()
{
----
}

public static void main(String[] args)
{
----
}
}


Which one of the method is called first for execution?
Posted
Updated 11-Aug-10 21:25pm
v2

1 solution

Try it! When I did, the first one never got called, but the second one did. That's because its signature matches what the JRE wants as an entry point.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900