File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes ArrayOutOf Bound Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayOutOf Bound Exception" Watch "ArrayOutOf Bound Exception" New topic

ArrayOutOf Bound Exception

shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
I tried to convert arraylist(object) into string and then into date..I'm getting the following exception..How to avoid this and make my program run...

Sunny Jain
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

The problem is difficult to track..because of Variable names and we don't know what is the output when you parsed the XML File, still I can tell you how to track your problem, as per my understanding problem lies in the following part of code :

You can try the following modification:

This is as per my understanding of the code.

Thanks and Regards,
SCJP 1.5 (90%), SCWCD 1.5 (85%), The Jovial Java, java.util.concurrent tutorial
Sunny Jain
Ranch Hand

Joined: Jul 23, 2007
Posts: 433

Oops !! I made the wrong if condition..!! I am sorry..!!
Please modify it :

if( wrk_len < list.size( ) )
I agree. Here's the link:
subject: ArrayOutOf Bound Exception