JavaNewbie
Programmer
I am tring to create a new variable of type Node (which I created myself; it's an object), and I am trying to pass it the lastElement() of the Vector, which contains only Node elements.
(i.e. Node temp = (Node) vectorObject.lastElement()
However, it simply throws an exception (ClassCastException)and quits on me. If I remove the cast, it tells me that I need an "explicit cast need to convert java.lang.Object to Node" Any help is appreciated
(i.e. Node temp = (Node) vectorObject.lastElement()
However, it simply throws an exception (ClassCastException)and quits on me. If I remove the cast, it tells me that I need an "explicit cast need to convert java.lang.Object to Node" Any help is appreciated