Updated problem002 java file so it works properly.