Saratov State University :: Online Contester


::Go
- home
- news
- register
- update personal info
- problemset archive
- submit
- status online
- standing
- contests
- virtual contests
- forum
- statistic
- FAQ
- links
- projects

::Poll
Are you registered on Codeforces?
Yes
No
What is it???

[results]

::webboard

JAVA CODE???
Author: rickganesh
ID: 066377
Problem: 111
Contest: 0
Date: 2015-07-23 08:22:22

Ok I try to run the following code:
package pack1;
import java.util.Scanner;
import java.lang.Math;
public class Java{

public static void main(String []args){
System.out.println("What is your number?(I only take inputs greater than 0)");
int num= new Scanner (System.in).nextInt();

if (num > 0)
{
double sqrt = Math.sqrt(num);
System.out.println (Math.floor(sqrt));

}
}
}
The code works perfectly but I just can not get past this error:

class Java is public, should be declared in a file named Java.java
public class Java{

ANY HELP??

see sub-tree reply to that message


::Login
Forgot password?

::News
22.10.12 - The problems from the Southern Subregional Programming Contest 2012 added to the problemset archive (542 - 553).
22.10.12 - After the start of the contest the statements in PDF will be available by the link.
23.10.11 - The problems from the Southern Subregional Programming Contest 2011 added to the problemset archive (530 - 541).

::Counter

Server time: 2017-11-23 06:32:25Online Contester Team © 2002 - 2016. All rights reserved.