Eclipse Generic Warning : Type safety: Unchecked cast from T to E -
how can avoid generic warnings in following code? eclipse generic warning : type safety: unchecked cast t e
is there way improve code. putting , removing values stack.
public static <t, k, e> void genericstack(t a, k b) { stack<e> st = new stack<e>(); st.push((e) a); st.push((e) b); b = (k) st.pop(); = (t) st.pop(); }
Comments
Post a Comment