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

    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
    Posts
    47
    Rep Power
    0

    Default

    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.
    Bye.

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

Similar Threads

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