• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

invalid cast exception

 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
need an easy, small code just to understand invalid cast exception in java
 
Joseph Mokenela
Ranch Hand
Posts: 66
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Buy invalid cast exception, do you mean class cast exception?
 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes
 
Rob Spoor
Sheriff
Pie
Posts: 20661
65
Chrome Eclipse IDE Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could search for ClassCastException and get lot of examples from this forum - SearchFirst (Also the link to the Documentation of the exception has an example)

Update:
I was really late to post this reply, Rob has provided a simple example.
 
Joseph Mokenela
Ranch Hand
Posts: 66
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can check the java documentation on ClassCastException JavaDocs
 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Rob Spoor
thanks a lot for such a nice example

@Mohamed Sanaulla
next time i will surely check these link first . thanks

@Joseph Mokenela
thanks
 
Campbell Ritchie
Sheriff
Pie
Posts: 50180
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
. . . and welcome to the Ranch
 
Mike Simmons
Ranch Hand
Posts: 3090
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joseph Mokenela wrote:Buy invalid cast exception, do you mean class cast exception?

By "buy", do you mean "by"?

Sorry, I couldn't resist. Carry on...
 
abhay jain
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Campbell Ritchie

Looks like a great place to be, Thankssss!

@Mike Simmons

my opinion :
in a QWERTY key board 'u' and 'y' looks too closer for such a typing mistake


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic