Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public void remove(String key) throws MapException {
  2. // TODO Auto-generated method stub
  3. for(int i = 0; i <List.length;i++){
  4. if(List[i] !=null && List[i].equals(key)){
  5. List[i] = null;
  6. numberOfElements--;
  7. }else{
  8. throw new MapException("Nothing here", null);
  9. }
  10. }
  11.  
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement