wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes ArrayList Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "ArrayList Exceptions" Watch "ArrayList Exceptions" New topic

ArrayList Exceptions

Gus Smith

Joined: Nov 05, 2011
Posts: 8
Hey guys, playing around with ArrayLists and trying to calculate various things with Rainfall using one. However, it keeps throwing exceptions whenever I try to interact with the ArrayList itself and I can't figure out why. Any hints or tips in the right direction would be appreciated, thanks.

Mori Gad

Joined: Dec 16, 2011
Posts: 16

Your constructor is wrong, if you intend to use rainfall outside of it.

It should be

The way you currently have it is creating a local scope variable rainfall.
Gus Smith

Joined: Nov 05, 2011
Posts: 8
Thank you, should've seen that :p.
I agree. Here's the link: http://aspose.com/file-tools
subject: ArrayList Exceptions
Similar Threads
Second order sorting using Comparable Interface
Exceptions problem
code help
Problem in Threading - 2
Adding Array to a List - Cannot Resoleve the Problem for a Week