Write a Java program to print the odd numbers from 1 to 20

Source Code:

public class P16 {
public static void main(String[] args) {
for(int i=1; i<=20; i+=2) {
System.out.print(i + " ");
}
}
}

Output: