Update MyLinkedList.java

code from class
not sure if we have hw (nothing on the website), but also i have two tests tomorrow and i got home really late, so i'll just do it tomorrow when i hopefully have time