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 will print this
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 to repeat 20 times just modify the first one.
If you can tell me an API that can execute this would also help.