Output : Id=1 Name=String1 null Id=2 Name= I was getting 'InputMismatchException', and I handled it