View RSS Feed

Recent Blogs Posts

  1. ArrayStoreException

    by , 05-24-2011 at 02:48 PM (My Java Tips)
    java.lang.ArrayStoreException is a runtimeException and is thrown when we try to store wrong type of object into an array of objects.

    Constructors:

    Java Code:
    ArrayStoreException()
    ArrayStoreException(String s)
    For example: Storing an Integer object in a Strign array will cause this exception.

    Java Code:
    Object x[] = new String[3];
    x[0] = new Integer(0);
    Since its a runtime exception, compiler won't ...
    Categories
    Java SE