I\'ve determined that a Java ArrayList.add is similar to a JavaScript Array.push
I\'m stuck on finding ArrayList functions sim
maybe you want to take a look java.util.Stack class.
it has push, pop methods. and implemented List interface.
for shift/unshift, you can reference @Jon's answer.
however, something of ArrayList you may want to care about , arrayList is not synchronized. but Stack is. (sub-class of Vector). If you have thread-safe requirement, Stack may be better than ArrayList.