Using a "global" for passing and returning values from methods is not the way to it.
Have the method return the array of Strings that it creates.
Type: Posts; User: Norm
Using a "global" for passing and returning values from methods is not the way to it.
Have the method return the array of Strings that it creates.
The whole array is referenced by using the name of the array without the []s
Consider how the for loop works. The i++ part increments i, the i < list.length part ends the loop when i gets too big.
When the loop ends, i is past the end of the array.
Why do you want the...
The terminating condition in the for loops should NOT use hardcoded numbers for going through arrays.
They should use the length field of the array to get the array's size.
Check to make sure that the storedList() method is defined to return an array.
Could you be more explicit and give the name of "this array" and the name of "this method"?
The compiler does not think "this array" is an array.
What happened to the text of the error message. There should be separate lines for lots of it. Parts of the message are missing like the source line and the line number. Without the source lines...
Please copy the full text of the error messages and paste it here. Not an image, the text.