Since I am using IntelliJ, the result (even if it is correct) prints "Hallo Amigo". Also in other tasks. I seems as it is a, I don't know whats the right word, system string which I set in a task before maybe? Does somebody know how I have to set up intelliJ to print the result of my recent code?
intelliJ does always print another result
Du musst angemeldet sein, um einen Kommentar schreiben zu können
5 Mai 2021, 13:17
See the little green arrow next to lines #7 and #13 in the picture you shared, click one of those from now on. One will always be right next to the main() method on any task you are working on. IntelliJ defaults to running the last main() method that has been set. This is because it is a developer's environment and set up to aid in debugging. Programs could have multiple entry points, and you could be writing code/debugging a class that you don't want run when you hit the green arrow. It allows you to set the entry point you want to run. The Codegym tasks, all being in the same root directory, are interpreted as one big project by IntelliJ and not individual projects. Anyways, if you use that green arrow next to main you won't have any issues.
5 Mai 2021, 13:37
Ah nice, thank you again, and also for the explanation