Here are two recursion methods, for me they are equally or more intuitive:

public int maxAreaOfIsland(int[][] grid) {
int r = grid.length, c = grid[0].length, max = 0;
int[] area = new int[1];
for (int i = 0; i < r; i++) {
for (int j = 0; j < c; j++) {
if (grid[i][j] == 1) {
dfs(grid, i, j, r, c, area);
max = Math.max(max, area[0]);
area[0] = 0;
}
}
}
return max;
}
public void dfs(int[][] grid, int i, int j, int r, int c, int[] area) {
if (i < 0 || i >= r || j < 0 || j >= c || grid[i][j] != 1) return;
grid[i][j] = -1;
area[0] += 1;
dfs(grid, i+1, j, r, c, area);
dfs(grid, i-1, j, r, c, area);
dfs(grid, i, j+1, r, c, area);
dfs(grid, i, j-1, r, c, area);
}
public int maxAreaOfIsland(int[][] grid) {
int r = grid.length, c = grid[0].length, max = 0;
int[] area = new int[1];
for (int i = 0; i < r; i++) {
for (int j = 0; j < c; j++) {
if (grid[i][j] == 1) {
int cur = dfs(grid, i, j, r, c);
max = Math.max(max, cur);
}
}
}
return max;
}
public int dfs(int[][] grid, int i, int j, int r, int c) {
if (i < 0 || i >= r || j < 0 || j >= c || grid[i][j] != 1) return 0;
grid[i][j] = -1;
int cur = 1;
cur += dfs(grid, i+1, j, r, c);
cur += dfs(grid, i-1, j, r, c);
cur += dfs(grid, i, j+1, r, c);
cur += dfs(grid, i, j-1, r, c);
return cur;
}