What is wrong here? I tried to do this task without instanceof and it didn't work at all, but now it always calls print with String