java: how to use clone() and what about the cast check

前端 未结 4 998
小蘑菇
小蘑菇 2020-12-11 08:14

This code:

class RawStringIterator {
        java.util.Stack stateStack = new java.util.Stack();
        RawStringIterator(RawStrin         


        
4条回答
  •  清歌不尽
    2020-12-11 08:32

    You have very little choice but to ignore it.

    Whilst not directly relevant (because you're not writing a clone() method), this entry in the Java Generics FAQ makes good reading (as does the whole FAQ!)

提交回复
热议问题