Code has nothing to do with "Hello world", but keeps printing "hello world"

Bug description:

Expected vs Current Behavior:

Steps to reproduce:

Bug appears at this link:

Screenshot(s)/Screen Recording:

Browser/OS/Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 OPR/

Replit Profile:

why is this happening?

My guess is you were missing a Main.class file or rather, still using the template’s. Unless you do some fancy fiddly things, the program will only run from the Main class’ main method. Name TreeMaker Main instead (and remove the ‘^’ on line 19) and you will be good to go.

1 Like