//you have to do it manually int index = 0; while True { System.out.println("Current index is: " + (index)); index ++ }