hi, everybody: I am busying doing the FBN assignment. And in coding criterialFind() method, I have a ArrayList instance, list, to store the DataInfo object, which satisfy the criteria requirement. u know, the return value should be DataInfo, so i try to use :return (DataInfo)list.toArray() to return the value. But "castException" is produced. something wrong when i use the toArray() method? Thank in advance!
posted 13 years ago
Hi Xiaoma, The first time I used ArrayList the same thing happend to me. you have to do something like this:
Hope this helps Michael Morris SCJP2
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher