Jul 21, 2009

Solution for java puzzles(3)

/*What declaration turns this loop into infinitive loop.*/

public class Looper {
public static void main(String[] args) {
// Place your declaration for i here

while (i == i + 1) {
}
}
}

Solution:
// Place your declaration for i here
double i = 1.0/0.0