I'm new in java programming and there's something confusing me with /t escape sequence. I tried to write the code for multiplication table:
for(int i = 1; i<=10; i++){
for(int j = 1; j<=5; j++){
System.out.println(j + "*" + i + "=" + j*i + "\t");
}
System.out.println();
}
How come that the ouput is like this:
I mean, why isn't the tab "the same size" in every case, i.e. 1x1=1 is quite far from 1x2=2, but 10x1=10 and 10x2=20 is closer. Also, when I try to do something like this in the code:
System.out.println(j + "*" + i + " = " + j*i + "\t");
(notice the spaces in both sides of equal sign), the output messes up: