public boolean exploredepth(int source, int goal, int matrix[][]){
      boolean pathFound = false;
      int destination, element;

      for(int vertex = 1; vertex <= numberOfSommet; vertex++){
        parent[vertex] = -1;
        visited[vertex] = false;
      }

      queue.add(source);
      parent[source] = -1;
      visited[source] = true;

      while(!queue.isEmpty()){
        element = queue.remove();
        destination = 1;
        while (destination <= numberOfSommet)
            {
                if (matrix[element][destination] > 0 &&  !visited[destination])
                {
                    parent[destination] = element;
                    queue.add(destination);
                    visited[destination] = true;
                }
                destination++;
            }
        }
      if(visited[goal])
        {
            pathFound = true;
        }
      return pathFound;
  }