Checked and Unchecked exceptions








  This  is     little  bit    discussion  on exceptions . 



           

  Unchecked Exceptions .

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

4) Class<> getClass() 
This method returns the runtime class of this Object.

5) int hashCode() 
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)


                                                        Object Class 


                              
Checked and Unchecked exceptions Checked  and Unchecked  exceptions Reviewed by Mukesh Jha on 12:18 AM Rating: 5

No comments:

Add your comment

All Right Reserved To Mukesh Jha.. Theme images by Jason Morrow. Powered by Blogger.