Run Java program different a different name - other than
tkamal (3)

Right now it seems Java programs can only run if you have a file name - if you have other files in the folder with a different name etc these Java file cannot run?
Is there a way to get over this issue?

You are viewing a single comment. View All
timmy_i_chen (962)

There's no way to change which file is executed; however, you can instantiate other classes in the same directory. E.g. if I have in the same directory as I can just do:

Car c = new Car(args);
AideOropeza (0)

@timmy_i_chen that doesn't work for me :(

timmy_i_chen (962)

@AideOropeza Can you link me to a repl where you are trying to do it?