In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
import java.util.*;
public class Javaexcercise {
public static void main(String[] args){
for (int i = 1; i < 20; i++) {
if (i % 2 != 0) {
System.out.println(i);
}
}
}
}
In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
Result:
1
3
5
7
9
11
13
15
17
19
need an explanation for this answer? contact us directly to get an explanation for this answer