+ 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?

4th Jul 2016, 10:47 AM
Dakotah
2 odpowiedzi
+ 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];
4th Jul 2016, 3:23 PM
Dakotah
0
arr = new int[3]
5th Jul 2016, 10:58 AM
leela krishna
leela krishna - avatar