listing recursion continued int adex= bdex= cdex= while(adex sizea &bdex sizeb/neither array empty 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 sizeb/arraya is emptyarrayc[cdex++arrayb[bdex++]/but arrayb isn' /end merge(///display array public static void display(int[thearrayint sizefor(int = <sizej++system out print(thearray[ ")system out println("")///end class mergeapp ///////////////////////////////////////////////////////////////in main(the arrays arrayaarrayband arrayc are createdthen the merge(method is called to merge arraya and arrayb into arraycand the resulting contents of arrayc are displayed here' the output the merge(method has three while loops the first steps along both arraya and arraybcomparing elements and copying the smaller of the two into arrayc the second while loop deals with the situation when all the elements have been transferred out of arraybbut arraya still has remaining elements (this is what happens in the examplewhere and remain in arraya the loop simply copies the remaining elements from arraya into arrayc the third loop handles the similar situation when all the elements have been transferred out of arrayabut arrayb still has remaining elementsthey are copied to arrayc