Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我仍在学习 Java 集合框架及其工作原理....
据说我们不能分配涉及类型参数的大小,所以当我编写以下代码时
Stacks<card> stack = new Stacks[5]; // it causes a compiler warning
有什么办法可以隐藏这个警告吗?
您确定要创建 Stack 数组吗?更好地使用:
Stack<Card> myStack = new Stack<Card>();