Entiers, Pile: Print only the values in the stack.
[TP_POO.git] / Entiers / Entiers.java
index 7251eb5f7d87b9a2e3cb51c7508ae2ad77b0c029..adcc8221fc812bc2d1b181a92a9edaa21652434c 100644 (file)
@@ -98,7 +98,7 @@ class Entiers {
 
     public void afficher() {
         System.out.println("----");
-        for (int i = 0; i < getSize(); i++) {
+        for (int i = 0; i < getCurrentSize(); i++) {
             System.out.println("element " + i + " " + int_array[i]);
         }
     }