add element to stack java

Java
Stack<String> stack = new Stack<String>();   
stack.add("Geeks"); 
Source

Also in Java: