Java: default program ("Hello World") cannot be deleted

I have started a few different Java Replits in the past few days and every time I start up a new program there is, of course, the example/placeholder code there to begin with (the “hello world” thing). Well, I have tried deleting this and writing my own program, but no matter what, the program I write will NOT show up in the Console - whenever I run it the ONLY output is “Hello World”.
Now, I tried commenting out the default Hello World code in a previous Replit and that did allow me to run my own code, and then afterwards I was able to delete it and just do my thing, but now even that is yielding no result. I cannot get any program to run and I cannot purge the cursed “Hello World” program from my Replit.

Am I overlooking something simple here? Is this a bug or is it user error?
Thanks for any help; I’m brand new to programming and brand new to Replit, too.

Hey @zhuk0v1991 welcome to the forums!

If it is not in the file it wont run by default. You can change the file that Replit runs in the .replit file


the class you want to run must be called Main. Or:

  1. Files tab > Click on the three dots in the top right > show hidden files
  2. Change Main in the .replit file to the class that you want to be run