Fix unchecked call to xxx as a member of raw type yyy
Source: StackOverFlow
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:
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);
}