Java Input String Compare Method In Java