Guest User

Untitled

a guest
May 25th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1. @Override
  2.     public boolean remove(Object arg0) {   
  3.         int j=0;
  4.         for (int i=0; i < koko; i++) {
  5.             if (alkiot[i].equals(arg0)) {
  6.                 alkiot[i] = null;
  7.                
  8.             } else {
  9.                 alkiot[j] = alkiot[i];
  10.                 if (i != j) alkiot[i] = null;
  11.                 j++;   
  12.             }      
  13.         }
  14.         if (j==koko) return false;
  15.         koko = j;
  16.         return true;
  17.     }
Add Comment
Please, Sign In to add comment