1 / 3
Dec 2009

Is there a special reason the class name need to be named Main, in a Java-submission?

It would be a nice feature if the judge system accepted any class with a main-method.

I know that there are more people than my self that needs to manually change the class name in every submission, and it gets somewhat tedious after a while. The reason I cant name every problem solution class Main is because i use (the commonly used) Eclipse IDE. The alternative would to create a entirely new Eclipse-project for every problem confused

  • created

    Dec '09
  • last reply

    Jul '10
  • 2

    replies

  • 1.3k

    views

  • 2

    users

1 month later
6 months later

Now the class name doesn't have to be 'Main', but only if the class is not public. So:
public class Main { - ok
class Main { - ok
public class CustomName { - [color=#FF0000]wrong![/color]
class CustomName { - ok