Yes, in both cases you're declaring and initializing a variable. Note that when using an ArrayList, you must use the associated methods to access them (the bracket indexing method doesn't work). For...
Type: Posts; User: helloworld922
Yes, in both cases you're declaring and initializing a variable. Note that when using an ArrayList, you must use the associated methods to access them (the bracket indexing method doesn't work). For...
There are two main solutions:
1. Expand your array as you go.
2. "Pre-read" to determine exactly how big your array needs to be.
The most common solution is the 1st one, using the ArrayList...