Compile Error in Java

When I Compiled a code in my IDE it didn’t give any error but when I submitted it here it is giving a compilation Error with message “the class name should be SummerHeat.java”

is SummerHeat name of the question for which you are submitting the solution

2 Likes

Yes

How many Times can i submit a Solution to a problem.

then you have to change the parent class name to the name of the question. Bcz here ( on codechef ) it is saved as the name of the question ( for eg: xyz.java ). And it is mandatory in java that your file name and the parent class name should be of the same name.

3 Likes

As many time you want. But some time due to heavy traffic it might show a dialogue to wait.

3 Likes

Getting this Error :

@kirtiraj19 Use Main in place of “SummerHeat” .

@kirtiraj19 You can rename the class name as “Main” and it should work. I would suggest using CHepler plugin for Java programmers. It easy for parsing contests and test cases

CHelper Java Plugin

Blog

Hope this helps :slight_smile: