KickJava   Java API By Example, From Geeks To Geeks.

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

java.lang
Class ClassCastException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.ClassCastException
All Implemented Interfaces:
Serializable
See Also:
Top Examples, Source Code

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


[304]Convert arraylist to String
By Anonymous on 2005/05/31 03:17:32  Rate
// convert arraylist to String 
  
  
 public static String convertStringFromArrList ( List lst, 
                                           String delim )  
  {  
     if  ( lst == null )   {  
         return null; 
      }  
  
  
     Object [  ]  oArray = lst.toArray (  ) ; 
     StringBuffer strBuf = new StringBuffer (  ) ; 
  
  
     try  {  
     if  ( oArray.length  >  0 )  strBuf.append ( oArray [ 0 ] .toString (  )  ) ; 
      }  catch ( ClassCastException cce )   {  
         //error handling here 
      }  
  
  
     for  ( int i = 1; i  <  oArray.length; i++ )   {  
         strBuf.append ( delim +  ( String ) oArray [ i ]  ) ; 
      }  
     return strBuf.toString (  ) ; 
  } 


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

Popular Tags