0
If I run this code
public class main
{
public static void main(String[] args)
{
teste(20);
}
public static void teste(int maximo)
{
for(int i = 0; i < maximo; i++)
{
System.out.println(i + " de " + maximo);
}
}
}
he’s gonna print that
0 de 30
1 de 30
2 de 30
3 de 30
4 de 30
5 de 30
6 de 30
7 de 30
8 de 30
9 de 30
10 de 30
11 de 30
12 de 30
13 de 30
14 de 30
15 de 30
16 de 30
17 de 30
18 de 30
19 de 30
20 de 30
but I would like instead of the line repeating itself 20 times just modify the first.
If you could give me an API that can run this would also help.
Your question was confused. You want only the first line message to be different, and the rest to remain 'x of N', is that it? If it’s not, explain it better, please.
– WyllianNeo
If I understand correctly you want to clean the screen, or show only the last result?
– Guilherme Nascimento