0
Why doesn't the code work?
I can not solve the programming problem. I need to remove all the even numbers from the array. What is the error in the code? Why is the index outside the bounds of the array? https://code.sololearn.com/cXGx1U9Gp81Y/#cs
2 Answers
+ 2
Line 37
int oddnumbers = 0;
Line 38
int[] newmas = new int[oddnumbers];
<oddnumbers> value is zero, so your <newmas> array is empty.
+ 1
Ipang , ah, really, thanks)