+ 1
How to define an Array within a private class?
I have build the array within the main public class, but now I'm trying to populate it within a private class. My Netbeans IDE says it cannot find the symbol. It's callin my array a class. What am I doing wrong?
2 Answers
+ 1
I got this. I had a misunderstanding of how to instantiate the array. I was trying int[] arr = new arr[3];
The solution is arr = new int[3];
0
arr = new int[3]