I ran this program on eclipse and it worked fine. Codegym is telling me that it can't run this program and that I should use IntelliJ IDEA. I don't know what this means and this is the only way I could solve the problem.