Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

classcastexception  RSS feed

 
kelly devon
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
am having a classcastexception, i know why i am. i caught it but cant get my code to delete a record in the database for me any ideas will be welcomed.could it be my logic?
here is a fragment of the code

[ September 27, 2005: Message edited by: Michael Ernest ]
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the exception gets thrown before you reach the logic that deletes a record, catching the exception makes no difference. You need to figure out first where the exception occurs, and remove it so your method can run to completion.
 
A feeble attempt to tell you about our stuff that makes us money
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!