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: https://replit.com/@bboy10010/broken-java-lmao

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/118.0.0.0 Safari/537.36 OPR/104.0.0.0

Replit Profile: https://replit.com/@bboy10010


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