Page 352 - ComputerScience_Class_11
P. 352
34 }
35 else
36 {
37 System.out.println(n+" not found");
38 }
39 }
40 }
The output of the preceding program are as follows:
Output 1:
BlueJ: Terminal Window - Java
Options
Enter a number: 23
Enter a number: 24
Enter a number: 25
Enter a number: 26
Enter a number: 27
Enter a number to be deleted:
25
23 24 26 27 0
Output 2:
BlueJ: Terminal Window - Java
Options
Enter a number: 23
Enter a number: 36
Enter a number: 65
Enter a number: 45
Enter a number: 47
Enter a number to be deleted:
32
32 not found
11.7 MERGING
Merging is the process of combining two or more arrays. It maintains the order of both arrays in the merged array. For
example, 1, 2, 3 and 4 are the elements of the first array and 8, 9, 10 and 11 are the elements of the second array. Then
1, 2, 3, 4, 8, 9, 10 and 11 are the elements of the new merged array.
350 Touchpad Computer Science (Ver. 3.0)-XI

