I am trying to print out the object in a tree. I have a toString method defined for the object. However, I get this error:
I get a classCastException
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [LPriorityQueueNode;
at PriorityQueue.printPriorityQueue(PriorityQueue.jav a:49)
at driver.main(driver.java:63)
System.out.println( tree[0].getElement());