@@ -0,0 +1,2218 @@
+package leetcode.number_of_islands;%0A%0Aimport java.util.LinkedList;%0Aimport java.util.Queue;%0A%0Apublic class Solution %7B%0A    public static class Point%7B%0A        int x, y;%0A        public Point(int x, int y)%7B%0A            this.x = x;%0A            this.y = y;%0A        %7D%0A    %7D%0A    public int numIslands(char%5B%5D%5B%5D grid) %7B%0A        if(grid == null %7C%7C grid.length == 0 %7C%7C grid%5B0%5D.length == 0)%7B%0A            return 0;%0A        %7D%0A        int w = grid%5B0%5D.length;%0A        int h = grid.length;%0A        Queue%3CPoint%3E queue = new LinkedList%3CPoint%3E();%0A        int solution = 0;%0A        for(int x = 0; x %3C h; x++)%7B%0A            for(int y = 0; y %3C w; y++)%7B%0A                if(grid%5Bx%5D%5By%5D == '1')%7B%0A                    solution++;%0A                    queue.offer(new Point(x, y));%0A                    grid%5Bx%5D%5By%5D = '0';%0A                    while(!queue.isEmpty())%7B%0A                        Point cur = queue.remove();%0A                        int nx, ny;%0A                        nx = cur.x - 1;%0A                        ny = cur.y;%0A                        if(0 %3C= nx && nx %3C h && 0 %3C= ny && ny %3C w && grid%5Bnx%5D%5Bny%5D == '1')%7B%0A                            grid%5Bnx%5D%5Bny%5D = '0';%0A                            queue.offer(new Point(nx, ny));%0A                        %7D%0A                        nx = cur.x + 1;%0A                        ny = cur.y;%0A                        if(0 %3C= nx && nx %3C h && 0 %3C= ny && ny %3C w && grid%5Bnx%5D%5Bny%5D == '1')%7B%0A                            grid%5Bnx%5D%5Bny%5D = '0';%0A                            queue.offer(new Point(nx, ny));%0A                        %7D%0A                        nx = cur.x;%0A                        ny = cur.y - 1;%0A                        if(0 %3C= nx && nx %3C h && 0 %3C= ny && ny %3C w && grid%5Bnx%5D%5Bny%5D == '1')%7B%0A                            grid%5Bnx%5D%5Bny%5D = '0';%0A                            queue.offer(new Point(nx, ny));%0A                        %7D%0A                        nx = cur.x;%0A                        ny = cur.y + 1;%0A                        if(0 %3C= nx && nx %3C h && 0 %3C= ny && ny %3C w && grid%5Bnx%5D%5Bny%5D == '1')%7B%0A                            grid%5Bnx%5D%5Bny%5D = '0';%0A                            queue.offer(new Point(nx, ny));%0A                        %7D%0A                    %7D%0A                %7D%0A            %7D%0A        %7D%0A        return solution;%0A    %7D%0A%7D%0A

Add java solution for 200. Number of Islands