Here is one while loop that will iterate 11 times.
public static void main(String[] args) {
int count=0;
while(count<=10){
System.out.print(count);
count++;
}
}
& the output will be definitely : 012345678910
But I want to display the same output in such a way that every iteration will overwrite the previous value while printing the value on console.
Here's the restriction is : We can not use file.
clearing the console on every iteration can be one of the ways, is there anything left we can do?