This code that I wrote
i%2==0?(System.out.println("even"):System.out.println("odd");
The compilation error being "Not a statement". Cant understand whats wrong.I also tried
(i%2==0)?(System.out.println("even");)
System.out.println("odd");) ;
even though it didnt look right
Can You please give me an explanation?
[edit]Disable smilies CR[/edit]
[ August 21, 2008: Message edited by: Campbell Ritchie ]