3 / 3
Aug 2010

Hi all,
Is there a way to have the file name different from the class name containing the main method in java?? I am asking this because the class has to be Main in spoj and that restricts the file names that I can use...

P.S: pls forgive if it is a stupid question. I am totally new to Java. Btw, I am using jdk 1.6.

  • created

    Aug '08
  • last reply

    Aug '10
  • 2

    replies

  • 198

    views

  • 3

    users

  • 1

    link

What I tend to do is solve the problem with whatever class/file name I want, then copy the source in and change the classname to Main rather than upload a file.. works for me.

2 years later

Suggested Topics

Want to read more? Browse other topics in JAVA based languages or view latest topics.