I have created an Array with some numbers. I want to find out how many even, and how many odd numbers it is in this Array. I have to print it out like this: (this is j
You always add the complete Length of the array to your variable
Try this instead of sumPar += arr.length;:
sumPar += arr.length;
sumPar++;