I have some issues with printing my code. I want my result to be aligned neatly but it isn't like that. It would be very grateful if someone could help me with the issue.
my code is as follows :
public static void main(String[] args) {
for(int j=1 ; j<=31;j++) {
System.out.printf("%10d",j);
if(j%7==0) {
System.out.println();
}
}
}
the result I get to see on my screen as belows

