Results 1 to 3 of 3
  1. #1
    paty is offline Member
    Join Date
    Jul 2007
    Rep Power

    Default how to handle exceptions

    hi guys
    I want to learn more about java, I did an application an a friend of mine told me that it's very important to do exceptions (try and catch blocks)
    I searched on Internet about it, but I don't understand very well what is it about and why do I have to use

    can you guide me ?

  2. #2
    henry_78 is offline Member
    Join Date
    Aug 2007
    Rep Power


    Hi paty,
    There are 2 types of exceptions.
    Unchecked exceptions : excptions that could happen at run time..u dont have to handle them because the java compilers dont check if u handled them or not (but u better do).
    Checked Exceptions: Exceptions that u have to handle because the java compiler will give u a compile erroe if u dont do.
    Exception can be hadled directley when they accoured(by try and catch blocke) or can be propagated (using throw clousle).
    Its really a very bi argument..u better read a bit about it.

  3. #3
    paty is offline Member
    Join Date
    Jul 2007
    Rep Power

Similar Threads

  1. How to handle socket Exception
    By mayank0512 in forum Networking
    Replies: 14
    Last Post: 12-21-2010, 11:31 PM
  2. [SOLVED] Handle own exception
    By stevemcc in forum New To Java
    Replies: 3
    Last Post: 04-10-2008, 04:55 AM
  3. Better way to handle exceptions
    By javaplus in forum Advanced Java
    Replies: 2
    Last Post: 01-16-2008, 06:47 PM
  4. handle wrong input int/null
    By Camden in forum New To Java
    Replies: 1
    Last Post: 12-16-2007, 09:37 PM
  5. Replies: 1
    Last Post: 06-07-2007, 05:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts