ex4-eric.java