num :1 2
num :3 4
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
I am going trought the array and counting all the elements which are the same. The answer given above is correct, 1 one occurs twice an 3 occurs 4 times. Why I am getting an out of bounds error?
Re: Java arrays
|All times are GMT +5.5. The time now is 07:25.|