I try on my intelij and everything run fine. But i think that maybe something went wrong. atleast first two requirement. It's weird. I mean why it can return true and false on same condition.