File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ArrayList Exceptions

 
Gus Smith
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, should've seen that :p.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic