Hi Sam,
Can you pass an array of ints into a class, and maintain the data?
I'm not exactly sure what you are asking here. You can certainly pass an array of anything into a method. I suppose what I don't understand is the part about maintaining the data. For example:
Every time you call the setCache() method, you will lose whatever was in this.cache prior to the call. Remember that an array is an Object. Now you could change the signature of the secCache() method to return the old cache like this:
Or you could have a method to append elements to the cache:
Hope this helps,
Michael Morris
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