String[][]arr1={
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{"R"," "," "," "," "," "," "},
{"R"," "," "," "," "," "," "},
{"R"," "," "," "," "," "," "},
{"R"," "," "," "," "," "," "}
};
String[][]arr2={
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{" "," "," ","R","R","R","R"}
};
String[][]arr3={
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{"R"," "," "," "," "," "," "},
{" ","R"," "," "," "," "," "},
{" "," ","R"," "," "," "," "},
{" "," "," ","R"," "," "," "}
};
String[][]arr4={
{" "," "," "," "," "," "," "},
{" "," "," "," "," "," "," "},
{" "," "," ","R"," "," "," "},
{" "," ","R"," "," "," "," "},
{" ","R"," "," "," "," "," "},
{"R"," "," "," "," "," "," "}
};
System.out.println(check(arr1));
System.out.println(check(arr2));
System.out.println(check(arr3));
System.out.println(check(arr4));
한번 실행해보시고 for문의 범위를 왜 그렇게 만들었는지 다시 생각해보세요