File naming in Java

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
serur
A great helper
Posts: 251
Joined: Thu Feb 23, 2006 11:30 pm

File naming in Java

Post by serur » Wed Jan 23, 2008 7:15 am

The Judge requires that we should have a Main class => the file itself should be called Main.java. Then what should I do if I'm going to write Java solutions for problems X,Y and Z?

MAK
New poster
Posts: 28
Joined: Sun Oct 23, 2005 3:44 pm
Location: Dhaka, Bangladesh

Post by MAK » Sun Mar 23, 2008 9:38 pm

The file name does not have to be Main.java. The driver class in the file should be named Main. The file name can be anything you want provided that the class Main is not declared public.

Post Reply

Return to “Java”