KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > lang > CloneNotSupportedException

java.lang
Class CloneNotSupportedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.CloneNotSupportedException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ServerCloneException
See Also:
Top Examples, Source Code, Cloneable, Object.clone()

public CloneNotSupportedException()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1532]Object cloning exception
By please rectify this exception on 2005/09/09 09:00:28  Rate
import java.lang.reflect.*; 
 import java.io.*; 
  
  
 public class GenClone {  
    
 public static void main ( String args [  ]  )  {  
  }  
  
  
 public Object genClone ( Object obj )  {  
    
 try {  
   Class cls = obj.getClass (  ) ; 
   obj = super.clone (  ) ; 
  
  
      } catch ( CloneNotSupportedException e )  {  
     e.printStackTrace (  ) ; 
      } catch ( Exception e1 )  {  
     e1.printStackTrace (  ) ;   
      }  
     return obj; 
    }  
  }  
 


public CloneNotSupportedException(String s)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags