Added Ex5.java