title: Finding connected components of adjacency matrix graph
body: <p>I have a random graph represented by an adjacency matrix in Java, how can I find the connected components (sub-graphs) within this graph?</p>
  
  <p>I have found BFS and DFS but not sure they are suitable, nor could I work out how to implement them for an adjacency matrix.</p>
  
  <p>Any ideas?</p>