Results 1 to 6 of 6

Thread: What are the different built-in Exceptions available in java?

  1. #1
    Join Date
    Dec 2009
    Posts
    68

    What are the different built-in Exceptions available in java?

    Hi all,

    I am new to the Java programming language. I have very good knowledge about the C and C++ programming. In java the don't about the various 'built-in Exceptions' available. I know we can define use defined built-in Exceptions. But I want to be aware about the different built-in Exceptions of java. If you have knowledge about the built-in Exceptions of java then please let me know that.

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: What are the different built-in Exceptions available in java?

    Hi, Please refer following built-in Exceptions of java language:
    • ArrayStoreException: This exception is related to incompatible type array element.
    • ClassCastException: This exception is related to invalid cast.
    • SecurityException: This exception is related to attempt to violate security.
    • ArithmeticException: This exception is related to arithmetic error, such as divide-by-zero.
    • IllegalThreadStateException: This exception is related to incompatible requested operation.

  3. #3
    Join Date
    Jan 2008
    Posts
    1,521

    Re: What are the different built-in Exceptions available in java?

    Hi friend,

    There are broad range of built-in Exceptions which are available in java. Following are some built-in Exceptions which are I know:
    * NumberFormatException
    * StringIndexOutOfBounds
    * ArrayStoreException
    * IllegalThreadStateException
    * SecurityException
    * IndexOutOfBoundsException

  4. #4
    Join Date
    Apr 2008
    Posts
    1,948

    Re: What are the different built-in Exceptions available in java?

    Java language enables various built in Exception classes to the programmer in the way to facilitate Java coding. They are basically defined as unchecked exceptions because they are not checked by the complier to see if a method handles or throws these exceptions.The most common exceptions are subclasses of the standard type RuntimeException. They are not required to be manually included in any method’s throws list.

  5. #5
    Join Date
    May 2008
    Posts
    2,012

    Re: What are the different built-in Exceptions available in java?

    It's quit difficult to know about all built-in Exceptions of java as there are large number of built-in Exceptions. In java 'out-of-bound index' is handled by 'IndexOutOfBoundsException' exception. If your program comprise the some arithmetic error then you will get the 'ArithmeticException'. Suppose you try to do the value divided by zero then it comes under the 'ArithmeticException'. The invalid casting in program is related to the 'ClassCastException' exception.

  6. #6
    Join Date
    Apr 2008
    Posts
    2,005

    Re: What are the different built-in Exceptions available in java?

    Hi,

    Study following built-in exception of Java with their meaning:
    • ArithmeticException(Related to Arithmetic error)
    • IllegalStateException(Related to incorrect application)
    • StringIndexOutOfBounds(Related to out of bout index)
    • TypeNotPresentException(Related invalid Type)
    • NegativeArraySizeException(Related to array with negative size).

Similar Threads

  1. Built in functions in java
    By Diellza in forum Software Development
    Replies: 3
    Last Post: 15-01-2011, 06:17 AM
  2. How to Throw Exceptions in Java?
    By Bigga Lexx in forum Software Development
    Replies: 4
    Last Post: 18-02-2010, 05:57 AM
  3. What is Log .NET Exceptions
    By Agneya in forum Software Development
    Replies: 4
    Last Post: 07-02-2010, 01:34 AM
  4. Replies: 5
    Last Post: 18-01-2010, 05:41 PM
  5. What are user defined exceptions in Java?
    By Migueel in forum Software Development
    Replies: 5
    Last Post: 30-11-2009, 07:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,119,208.44263 seconds with 17 queries