This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Java in General and the fly likes ClassCastException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "ClassCastException" Watch "ClassCastException" New topic
Author

ClassCastException

Adamu Yifru
Greenhorn

Joined: May 22, 2003
Posts: 6
Why does the following code give me classCastException error
some LinkedList
Integer.parseInt(nonRTarrivalTime.getFirst())
and
((Integer)nonRTarrivalTime.getFirst()).intValue()
I have tried both and they give me the same error.
thanks in advance.
Adamu Yifru
Greenhorn

Joined: May 22, 2003
Posts: 6
Never mind I casted it to a string and then to int.
 
GeeCON Prague 2014
 
subject: ClassCastException