public int numberOfIsland(int[][] graph){
        
        boolean[][] visited = new boolean[graph.length][graph.length];
        int count = 0;
        for(int i=0; i < graph.length ; i ++){
            for(int j =0 ; j < graph[i].length ; j++){
                if(visited[i][j] == false && graph[i][j] == 1) {
                    count++;
                    DFS(graph,visited,i,j);
                }
            }
        }
        return count;
    }
http://www.geeksforgeeks.org/find-number-of-islands/
src/com/interview/graph/NumberOfIsland.java