Java examples for Language Basics:while
What does the following program print? 3
public class Main { public static void main(String[] args) {//from ww w . ja v a 2 s . c o m int row = 10; while (row >= 1) { int column = 1; while (column <= 10) { System.out.print(row % 2 == 1 ? "<" : ">"); ++column; } --row; System.out.println(); } } }