5 ms·
In what sense do these lack conditionals?
by jedbrown 16y ago
In what sense do these lack conditionals?
- deleted 16y ago[deleted]
- RodgerTheGreat 16y agoI'm also rather confused as to what "doesn't work in Java". The logical conjunction operator does short-circuit, it's merely restricted to the boolean type. Since you aren't using the result, it doesn't matter: static boolean print1000(int n) { System.out.format("%d\n", n); return n<1000 && print1000(n+1); } public static void main(String[] args) { print1000(1); }