✅ Simple Java Solution
CODE\nJava []\npublic char[][] rotateTheBox(char[][] box) {\n\tint r = box.length, c = box[0].length;\n\tchar[][] res = new char[c][r];\n\tfor(int i=0; i<r; i++
## **CODE**\n```Java []\npublic char[][] rotateTheBox(char[][] box) {\n\tint r = box.length, c = box[0].length;\n\tchar[][] res = new char[c][r];\n\tfor(int i=0; i<r; i++) {\n\t\tint lastObs = c-1;\n\t\tfor(int j=c-1; j>=0; j--) {\n\t\t\tif(box[i][j] == \'*\') {\n\t\t\t\tlastObs = j-1;\n\t\t\t\tres[j][i] = \'*\';\n\t\t\t} else if(box[i][j] == \'#\') {\n\t\t\t\tres[j][i] = \'.\';\n\t\t\t\tres[lastObs--][i] = \'#\';\n\t\t\t} else {\n\t\t\t\tres[j][i] = \'.\';\n\t\t\t}\n\t\t}\n\t}\n\n\tint left=0, right=r-1;\n\twhile(left < right) {\n\t\tfor(int i=0; i<c; i++) {\n\t\t\tchar temp = res[i][left];\n\t\t\tres[i][left] = res[i][right];\n\t\t\tres[i][right] = temp;\n\t\t}\n\t\tleft++;\n\t\tright--;\n\t}\n\n\treturn res;\n}\n```
['Java']