コード例 #1
0
    public void printList() {

      System.out.println(this);
      if (nextElement != null) {
        nextElement.printList();
      }
    }
コード例 #2
0
  public void printList() {

    if (headOfStack != null) {
      headOfStack.printList();
    }
  }