Update Class1.java

refactoring