Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.30 KB | None | 0 0
  1. if (!this.contains(o)) {
  2.             return false;
  3.         }
  4.  
  5.         int i = 0;
  6.         while(!o.equals(this.data[i])) {
  7.             i++;
  8.         }
  9.  
  10.         while(i < this.data.length) {
  11.             if (i == this.data.length-1) {
  12.                 this.data[i] = null;
  13.             } else {
  14.                 this.data[i] = this.data[i+1];
  15.             }
  16.             i++;
  17.         }
  18.  
  19.         this.size--;
  20.         return true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement