I am trying to replace a "." with an "X". This is eventually for a text based maze that the computer will figure out. I just want to get the first one changed, and hopefully I can figure the rest out from there. This is what I have so far.
Scanner sc = new Scanner(maze2);
public void traverseMaze(int row, int col, int handLocationX, int handLocationY) {
    for(int rowCount = 0; rowCount <=11 ; rowCount ++){
        row = rowCount;
        for(int colCount = 0; colCount <= 11; colCount++){
            col = colCount;
            if(row ==2 && col ==0){
                System.out.println(col);
                System.out.println(row);
                sc.next().replace(".", "X"); //stuck here HELP! :)
            }
        }
        System.out.println(maze2);
    }
 
     
    