IT Community - Software Programming, Web Development and Technical Support

Checked and UnChecked Exception

This is a discussion on Checked and UnChecked Exception within the Java Programming forums, part of the Software Development category; What are Checked and UnChecked Exception?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1  
Old 07-12-2007, 02:56 AM
sivakumar sivakumar is offline
D-Web Trainee
 
Join Date: Jul 2007
Posts: 36
sivakumar is on a distinguished road
Post Checked and UnChecked Exception

What are Checked and UnChecked Exception?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 07-12-2007, 03:01 AM
Arun Arun is offline
D-Web Trainee
 
Join Date: Mar 2007
Posts: 42
Arun is on a distinguished road
Default Re: Checked and UnChecked Exception

A checked exception is some subclass of Exception (or Exception itself), excluding class RuntimeException and its subclasses.
Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. eg, IOException thrown by java.io.FileInputStream's read() method·
Unchecked exceptions are RuntimeException and any of its subclasses. Class Error and its subclasses also are unchecked. With an unchecked exception, however, the compiler doesn't force client programmers either to catch the
exception or declare it in a throws clause. In fact, client programmers may not even know that the exception could be thrown. eg, StringIndexOutOfBoundsException thrown by String's charAt() method· Checked exceptions must be caught at compile time. Runtime exceptions do not need to be. Errors often cannot be.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
count the time in seconds that a checkbox is really checked itbarota HTML, CSS and Javascript Coding Techniques 1 02-13-2008 09:16 PM
How can I ensure that one radio button is checked and that the relevant text field is itbarota HTML, CSS and Javascript Coding Techniques 1 10-17-2007 10:21 PM
When should u use a checked & unchecked exception in java? H2o Java Programming 1 07-24-2007 02:47 AM
How to postback the checkbox value in treeview when each time it is checked ? bluesky ASP and ASP.NET Programming 0 07-15-2007 11:24 PM


All times are GMT -7. The time now is 05:23 AM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.
Our Partners
One Way Moving Companies | Stamford Dentist | Euro Millions Lottery | Home Loans| Furniture

SEO by vBSEO 3.0.0