Problems with ArrayList using as a queue
Hi
I have a object of ArrayList and i m using as a queue.
while queueing an element from it i use toString() to use its value becouse the values that are being enqueued are of type string
before dequeuing i check it using isEmpty() funtion but some time this funtion returns false and controll goes to else case. and when it dequeue the value it throw and exception NoSuchElementException. in this case the size of arraylist is also return 0 in some case and size in some cases when there are values in the queue when isEmpty is false in case of exception
Any one can tell me the reason
it happens with irragular intervals of time.... becose values are equeqing and dequeing continously after some time interval.
Message was edited by:
12345789

