CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Exceptionssss

  1. #1
    Join Date
    Sep 2009
    Posts
    20

    Arrow 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

  2. #2
    Join Date
    May 2009
    Location
    Lincs, UK
    Posts
    298

    Re: Exceptionssss

    Have you ever read a book on Java?

  3. #3
    Join Date
    Apr 2007
    Posts
    425

    Re: Exceptionssss

    Quote Originally Posted by arpit2309 View Post
    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!

  4. #4
    Join Date
    Apr 2009
    Location
    TR
    Posts
    97

    Wink Re: Exceptionssss

    you should read a good source as jaccia's said.. u should start here..
    What Is an Exception?--How to Throw Exceptions?

    regards..

    Please use code tags like this :
    [SIGPIC][/SIGPIC]
    Code Your Dreams

  5. #5
    Join Date
    Sep 2009
    Posts
    20

    Re: Exceptionssss

    Quote Originally Posted by jcaccia View Post
    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

  6. #6
    Join Date
    Sep 2009
    Posts
    20

    Re: Exceptionssss

    Quote Originally Posted by holestary View Post
    you should read a good source as jaccia's said.. u should start here..
    What Is an Exception?--How to Throw Exceptions?

    regards..
    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
  •  





Click Here to Expand Forum to Full Width

Featured