Different solution in Java

This solution is in Java. It differs from the VBA solution because it
takes user input as the upper bound. It loops up to the upper bound but
steps by 3, and 5.