()
| 47 | |
| 48 | //incrase size function - it doubles the size and copie the elements of old array in the new array |
| 49 | private void increaseSize() |
| 50 | { |
| 51 | int[] arr1 = new int[arr.length*2]; |
| 52 | for(int i=0;i<arr.length;i++) |
| 53 | { |
| 54 | arr1[i] = arr[i]; |
| 55 | } |
| 56 | |
| 57 | arr=arr1; |
| 58 | } |
| 59 | |
| 60 | //to check whether the element to be delted is present in the array is present or not |
| 61 | public boolean delete(int value) |