Ask coding questions

← Back to all posts
How to run a file other than Main.java
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
MuktaGadgil
codexistent
mchapy1
Comments
hotnewtop
ash15khng

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

Highwayman