For senior-level developers: Q21. What’s the difference between a queue and a stack?
A. Stacks works by last-in-first-out rule (LIFO), while queues use the FIFO rule Q22. You can create an abstract class that contains only abstract methods. On the other hand, you can create an interface that declares the same methods. So can you use abstract classes instead of interfaces? A. Sometimes. But your class may be a descendant of another class and in this case the interface is your only option.