Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.Integer cannot be cast to java.lang.list

807601Feb 13 2008 — edited Feb 13 2008
I dunno why im getting this error but i think i properly typecast it...heres a portion of my program...
----------
ArrayList list = new ArrayList();

while (rset.next()){
int shares=rset.getInt("new_shares");
list.add(shares);
}

for(int i=0;i<list.size(); i++)
{
List new_list = (List) list.get(i);
System.out.println(list1);
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 12 2008
Added on Feb 13 2008
4 comments
302 views