I've seen it in many solutions on Leetcode.
People are still using Stack and LinkedList classes for their solutions involving queue and stack usage
which gives not best preformance. You would want to use best coding practices in
your real world projects.
And there is Java 13 out there already. (it is 2020 at the moment of writing this post)
One using java should be aware with recent language updates, it is always a plus to mention
them during interview.
Here is an ultimate usage of stack and queue:
Deque<Integer> stack = new ArrayDeque<>();
Queue<Integer> queue = new ArrayDeque<>();Deque in case of stack usage may look weird but it is an interface and we should always program
to interface (remember SOLID principles) but Stack is a class, so we use Deque coz it supports
same methods as stack. (push, pop) and ArrayDeque implements them
Deque can be also used for queue but you should use pollFirst and offerLast (Deque methods)
instead of poll and offer (Queue methods) accordingly
google for more information on that
cheers
https://stackoverflow.com/questions/6163166/why-is-arraydeque-better-than-linkedlist