title: Euler paths DFS implementation
body: <p>I'm implementing an algorithm to find all the euler paths in a graph. I'm basing myself, to create the dfs, in the code found here: <a href="https://stackoverflow.com/questions/6023137/find-all-possible-euler-cycles">Find all possible Euler cycles</a></p>
  
  <p>Here is my current code:</p>
  
  <pre><code>public class Graph {
  
  private int numVertex;
  private int numEdges;
  private boolean[][] adj;
  
  public Graph(int numVertex, int numEdges) {
      this.numVertex = numVertex;
      this.numEdges = numEdges;
      this.adj = new boolean[numVertex+1][numVertex+1];
  }
  
  public void addEdge(int start, int end){
      adj[start][end] = true;
      adj[end][start] = true;
  }
  
  public Integer DFS(Graph G, int startVertex){
      int i=0;
      pilha.push(startVertex);
      for(i=0; i&lt;G.numVertex; i++){
  
          if(G.adj[i][startVertex] != false){
              System.out.println("i: " + i);
              G.adj[i][startVertex] = false;
              G.adj[startVertex][i] = false;
  
              DFS(G, i);
  
              G.adj[i][startVertex] = true;
              G.adj[startVertex][i] = true;
          }
  
      }
      return -1;
  }
  
  Stack&lt;Integer&gt; pilha = new Stack();
  
  public static void main(String[] args) {
  
      Scanner input = new Scanner(System.in);
  
      int numVertices = input.nextInt();
      int numLinks = input.nextInt();
      int startNode = input.nextInt();
  
      Graph g = new Graph(numVertices, numLinks);
  
      for(int i = 0; i&lt;numLinks; i++){
          g.addEdge(input.nextInt(),input.nextInt());
      }
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Unfortunately i don't get the right results and i can't seem to figure out why. I've tried a lot of thing as storing the results from the dfs in a list and print them, but still i got no paths.</p>
  
  <p>any idea on how can i modify my code so i start getting the euler paths?</p>