Long story short, playing around with generics and comparables, having trouble printing out values directly. Here's a simple example
class Ideone<Key extends Comparable<Key>>
{
private Key[] keys = (Key[]) new Comparable[10];
public static void main (String[] args) throws java.lang.Exception
{
Ideone<Integer> test = new Ideone();
test.keys[0] = 3;
System.out.println(test.keys[0]);
}
}
Error I am getting is:
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Comparable; cannot be cast to [Ljava.lang.Integer;
Live code example: http://ideone.com/JPfUZw