Java examples for Language Basics:for
Use for loops without bodies to print the numbers 1 to 10 on the console
public class TerseCoder{ public static void main(String[] args){ for (int i = 1; i <=10; System.out.println(i++)); }/*from w ww . j av a 2s .c o m*/ }