Changed the Java Program