Fixed errors in homework3.java.