I had this interview question some years ago but I haven\'t found the answer yet.
What should be x and y to make a infinite loop?
while (x <= y&am
You've got your answer, I just wanted to say how I got to the same one. In the normal world such a test would be useless, there is no way for two number to work like that. So that means it HAS to be some java specific.
x and y could be either simple types - which makes it impossible right away.
x and y could be objects. But what objects are compared with <= or >=? Only 'boxed' numbers. Thus the answer comes up really fast.