Skip to content
← Back to Community
How to run a file other than Main.java
Profile icon
mchapy1

On Java, I want to run a public class I have made in a file, i.e File.java

Is there a way to make Main.java run code from a public class other than Main?

Voters
Profile icon
MulengaNgulale
Profile icon
ArunTihaiya
Profile icon
ChrisWaage
Profile icon
acAiGo21
Profile icon
MuktaGadgil
Profile icon
codexistent
Profile icon
mchapy1
Comments
hotnewtop
Profile icon
ash15khng

In repl.it you can only run the main file created by repl.it sadly.

Profile icon
Highwayman