HackerRank Welcome to Java! problem solution - TheCScience