Amy Gill před 6 roky
rodič
revize
a6113fdaf1

+ 5
- 5
src/main/java/Stack.java Zobrazit soubor

@@ -1,5 +1,5 @@
1
-public class Stack{
2
-    public boolean isEmpty(){
3
-        return false;
4
-    }
5
-}
1
+//public class Stack <E>{
2
+//    public boolean isEmpty(){
3
+//        return false;
4
+//    }
5
+//}

+ 11
- 4
src/main/java/StackArray/GenericStack.java Zobrazit soubor

@@ -8,14 +8,21 @@ import java.util.Stack;
8 8
  * Remember, you might need to resize the stack in the push method.
9 9
  * @param <E>
10 10
  */
11
-public class GenericStack<E> extends Stack<E> {
11
+public class GenericStack<E> {
12 12
     private E[] elements;
13 13
 
14
+    GenericStack<String> myStack = new GenericStack<>();
15
+
14 16
     public GenericStack() {
15 17
     }
16 18
 
17
-    @Override
18
-    public synchronized boolean isEmpty() {
19
-        return super.isEmpty();
19
+    public E isEmpty() {
20
+
21
+    }
22
+
23
+    public void push(E foobar) {
24
+    }
25
+
26
+    public E pop() {
20 27
     }
21 28
 }