I want to add an int into an array, but the problem is that I don\'t know what the index is now.
int[] arr = new int[15]; arr[0] = 1; arr[1] = 2; arr[2] = 3;
You can use a variable to count places in the array, so when ever you add a new element, you put it in the right place. For example:
int a = 0; int arr[5] = { }; arr[a] = 6; a++;