copyEvens
public int[] copyEvens(int[] nums, int count) { int newIndex=0; int i=0; int newArray[] = new int[count]; while(newIndex < count ){ if( ( nums[i] % 2) ==0 ) newArray[newIndex++]=nums[i]; i++; } return newArray; }
http://codingbat.com/prob/p134174
MySQL限时解答,24小时内友哥专业解答
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指
http://www.yougemysqldba.com
如有进一步需要请联系微信onesoft007
微博账号@友哥一指