Add Problem 3 Java