Hi, I'm getting a warning "Java uses unsafe or unchecked operations." when I cast a generic type K to a Comparable.
I've used generics <K extends Comparable<K>> in my class definition and my method takes a parameter of type K.
I then have this line:
if(((Comparable)key).compareTo(root.getKey())==0)
My question is: why do I get this warning? Is it just because the K object really gets passed in as an Object object? and is there any way to get rid of this warning?