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

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -