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 have to create two Integer Objects, for example:
Integer x = new Integer(2); Integer y = new Integer(2);
Because x and y are Objects and no ordinal types, you get an infinite loop.
x
y