i was trying to convert a List to object
actually i was getting the List from dB. I have to check the description field ,if field is greaterthan 100 letters i have to restrict to 30,
here is the code
PostingTO PTO ;
PTO = (PostingTO)resultList.get(i) ;
String txt = ((PostingTO)resultList.get(i)).getDescription();
if(txt.length() > 100)
while executing it gives the error classcast exception.
whats wrong is going on.
Thanks in advance....
Thanks I got it....
I took the result class as HashMap....
I changed some code now it is working..
code is like this...
HashMap hmResult = (HashMap) resultList.get(i);
String strDescription = (String)hmResult.get("description");
if(strDescription.length() > 30)