Saturday, February 14, 2015

C# vs Java : main method

The following are all valid main methods in C#
static void Main()
static int Main()
static void Main(string[] args)
static int Main(string[] args)
In Java, the main method must take in an array of Strings and is not allowed to return anything. The following are all valid main methods in Java.
static void main(String[] args)
static void main(String... args)

No comments:

Post a Comment