/merge java /demonstrates merging two arrays into third /to run this programc>java mergeapp ///////////////////////////////////////////////////////////////class mergeapp public static void main(string[argsint[arraya { }int[arrayb { }int[arrayc new int[ ]merge(arraya arrayb arrayc)display(arrayc )/end main(///merge and into public static void mergeint[arrayaint sizeaint[arraybint sizebint[arrayc int adex= bdex= cdex= empty while(adex sizea &bdex sizeb/neither array ifarraya[adexarrayb[bdexarrayc[cdex++arraya[adex++]else arrayc[cdex++arrayb[bdex++]while(adex sizeaarrayc[cdex++arraya[adex++]/arrayb is empty/but arraya isn' while(bdex sizebarrayc[cdex++arrayb[bdex++]/end merge(/arraya is empty/but arrayb isn' ///display array public static void display(int[thearrayint sizefor(int = <sizej++system out print(thearray[ ")system out println("")/