Advertisement
ShadowZek

Untitled

Feb 5th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. //Method that deletes the current element
  2. public void deleteCurrent()
  3. {
  4. if (current != null && previous != null)//Current is not at head
  5. {
  6. previous.link = current.link;
  7. current = current.link;
  8. }
  9. else if (current != null && previous == null)//Current is at the head
  10. {
  11. head = head.link;
  12. }
  13. else if (current == tail)
  14. {
  15.  
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement