So i am trying to make this board of 10 rows and 10 columns. I have to used the StringBuilder method to make it but I am unable to do so. My output is coming out wrong. Here is my code
import java.util.ArrayList;
import java.util.Scanner;
public class bord {
public static void main(String[] args) {
StringBuilder s= new StringBuilder();
for( int r=0;r<10;r++)
{
for( int c=0;c<10;c++)
{
s.append("-");
System.out.print(" "+s);
}
System.out.println("");
}
}
}
And here is what i want: