Add Problem 4 Java