Skip to content
Sign upLog in
← Back to Community

My code does not work after being transferred to replit

Profile icon
quick007

I coded this in** Eclipse** but for some reason, it is throwing out random errors on Repl.it that it did not have when on Eclipse

Voters
Profile icon
yellowmelro
Profile icon
srinikesh2929
Profile icon
katyadee
Profile icon
quick007
Comments
hotnewtop
Profile icon
Klokat

This is a bit of a weird one because repl.it doesn't allow you to rename Main.java. And that's the problem since in java your file name has to be the same as your class name. In your case your class name is Input so your file name should be Input.java. What you could do is change your class name to Main and it should run. Or you could create a new file called Input.java paste your code and then within Main.java have something like this:

class Main { public static void main(String[] args) { Input.main(args); }

Hope this helps. Cheers