(long value)
| 37 | } |
| 38 | |
| 39 | public void insert(long value) {//put element into array |
| 40 | |
| 41 | |
| 42 | if(find(value)){ |
| 43 | System.out.println("Value already exists."); |
| 44 | }else{ |
| 45 | a[this.nElements]=value; |
| 46 | this.nElements++; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | |
| 51 | public boolean delete(long value) {//delete the element if it found |