Java: immutable Stack?
- by HH
I chose to use Stacks and Tables before knowing Collections has immutable empty things only for Set, Map and List. Because the size of table does not change after its init:
Integer[] table = new Intger[0]
I can use the zero-witdh table as an empty table. But I cannot use final or empty Stack to get immutable Stack:
No immutability to Stack with…