MCPcopy Create free account
hub / github.com/PrajaktaSathe/Java / insert

Method insert

Programs/NoDupArray.java:39–48  ·  view source on GitHub ↗
(long value)

Source from the content-addressed store, hash-verified

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

Callers 1

mainMethod · 0.95

Calls 1

findMethod · 0.95

Tested by

no test coverage detected