Comme indiqué ci-dessous:
package com.test.sort; classe publique TestMerge {public static void main (String [] args) {int [] a = {1, 3, 5}; int [] b = {2, 3, 4, 7}; fusion m = new Merge (); M.Method (a, b);}} classe Merge {Méthode publique (int [] a, int [] {int l = int L = Méthode public (int [] a, int [] {int l = int L = Méthode public (int [] a, int [] {int l = int L = Méthode public (int [] a, int [] {int l = int L). B.Length; int [] temp = new int [l]; int i = 0, j = 0, h = 0; // vous devez utiliser pendant que vous ne pouvez pas utiliser if what (i <a.length || j <B.Length) {if (i == a.length && j <B.length) {temp [h ++] = b [j ++];} else if (i <a.Length && j == B.Length) a [i ++];} else if (a [i] <= b [j]) {temp [h ++] = a [i ++];} else if (a [i]> b [j]) {temp [h ++] = b [j ++];}} pour (int m: temp) {system.out.print (m + "");}}}}}L'exemple ci-dessus de Java combinant deux numéros ordonnés dans un tableau est le contenu entier que je partage avec vous. J'espère que vous pourrez vous faire référence et j'espère que vous pourrez soutenir Wulin.com plus.