class WhileExample { public static void main(String[] args) { int count = 0; while ( count < 5 ) { System.out.print(count); System.out.print(" "); count++; } } }