Checked and Unchecked exceptions
This is little bit discussion on exceptions .
Unchecked Exceptions .
List of Unchecked Exceptions
4) Class<> getClass()
5) int hashCode()
6) void notify()
8) String toString()
List of Unchecked Exceptions
some of common type are
ArrayIndexOutOfBoundsException
ClassCastException
IllegalArgumentException
IllegalStateException
NullPointerException
NumberFormatException
AssertionError
ExceptionInInitializerError
StackOverflowError
NoClassDefFoundError
Checked Exception
IOException
FileNotFoundException
ParseException
ClassNotFoundException
CloneNotSupportedException
InstantiationException
InterruptedException
NoSuchMethodException
NoSuchFieldException
ArrayIndexOutOfBoundsException
ClassCastException
IllegalArgumentException
IllegalStateException
NullPointerException
NumberFormatException
AssertionError
ExceptionInInitializerError
StackOverflowError
NoClassDefFoundError
Checked Exception
IOException
FileNotFoundException
ParseException
ClassNotFoundException
CloneNotSupportedException
InstantiationException
InterruptedException
NoSuchMethodException
NoSuchFieldException
Java Object Class Methods
1) protected Object clone( )
This method creates and returns a copy of this object.
2) boolean equqls(Object obj)
This method indicates whether some other object is "equal to" this one.
3) protected void finalize()
This method is called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
This method returns the runtime class of this Object.
This method returns a hash code value for the object.
6) void notify()
This method wakes up a single thread that is waiting on this object's monitor.
7) void notifyAll()
This method wakes up all threads that are waiting on this object's monitor.
8) String toString()
This method returns a string representation of the object.The java toString() method is used when we need a string representation of an object
9) Void wait()
This method causes the current thread to wait until another thread invokes the notify() method or the notifyAll() method for this object.
10) void wait(long timeout)
11) void wait(long timeout , int nanos)
10) void wait(long timeout)
11) void wait(long timeout , int nanos)
Checked and Unchecked exceptions
Reviewed by Mukesh Jha
on
12:18 AM
Rating:
No comments:
Add your comment