Public class array to merge with the ascending and descending order {
Private static int [] makeNewArr (int [] a, int [] b) {
//create a space saving array
Int [] c=new int [a. ength + b.l ength];
//assignment of a
for (int i=0; i
}
//to assignment b
for (int i=0; i
}
Return the c;
}
Public static void main (String [] args) {
Int [] a={1,7,9,11,13,15,17,19};
,4,6,8,10 int [] b={2};
Int [] c=makeNewArr (a, b);
PrintArray (c);
}
}
CodePudding user response:
This all Chinese character name, aren't you afraid of your teacher gas to do it in the middle of the night, error, array subscript bounds, best can standardize the naming rulesCodePudding user response:
Couldn't find pringArray this approach, where you define?CodePudding user response: