this is where you get the ArrayIndexOutOfBoundsException. i changed it from ">" to "==". all that needs to happen now, is that when R or C hits 10, then you need to change the direction you're putting your B's down. put them before the spot where you started putting them down. make sense?
if(C == 10)
break;
if(R == 10)
break;