-
i <= jis evaluated totrue, because auto unboxing happens for int
comparisons and then bothiandjhold the default value,0. -
j <= iis evaluated totruebecause of the above reason. -
i != jis evaluated totrue, because bothiandjare
different objects. And while comparing objects, there isn’t any need of
auto unboxing.
All the conditions are true, and you are not changing i and j in loop, so it is running infinitely.