This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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.
 
Have you checked out Aspose?
 
subject: ClassCastException
 
It's not a secret anymore!