*Source:* [StackOverFlow](https://stackoverflow.com/a/37604348)
**Answer:**
You are using a raw type in the method declaration. Change,
```static void myPush (Stack myStack, int b)```
to
```static void myPush (Stack<Integer> myStack, int b)```
**Alternatively,** make the method generic on *type* `T` like:
```java
static <T> void myPush(Stack<T> myStack, T b) {
myStack.push(b);
System.out.println("inserted element is: " + b);
System.out.println("this is on the stack: " + myStack);
}
```