-
September 18th, 2009, 01:31 PM
#1
Exceptionssss
im not gettin cleared with why do we use throws() and where????
same case with throw()
how to create throwable objects????
please help me out of it
-
September 18th, 2009, 01:46 PM
#2
Re: Exceptionssss
Have you ever read a book on Java?
-
September 18th, 2009, 02:15 PM
#3
Re: Exceptionssss
Originally Posted by arpit2309
im not gettin cleared with why do we use throws() and where????
same case with throw()
how to create throwable objects????
please help me out of it
use throws in a method definition whenever there is a method you are writing that may result in producing an error that is outside of the scope of your normal business logic
use throw to throw the exception that was declared as throws.
to create throwable objects you - surprise surprise - extend http://java.sun.com/javase/6/docs/ap...Throwable.html or one of it's subclasses (you just found another use for inheritance ... null pointer exception is different than a socket timing out! ).
Next, read into checked vs. unchecked exceptions and what family they belong to.
------
If you are satisfied with the responses, add to the user's rep!
-
September 18th, 2009, 02:21 PM
#4
-
September 18th, 2009, 03:32 PM
#5
Re: Exceptionssss
Originally Posted by jcaccia
Have you ever read a book on Java?
yes now a days im refering complete reference on java,,but dere it's not cleared out dat's why im asking
-
September 18th, 2009, 03:34 PM
#6
Re: Exceptionssss
Originally Posted by holestary
thanks dat was a better way to reply my question
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|