MyLinkList.java 486 B

1234567891011121314151617181920212223242526272829
  1. package J20250722;
  2. /**
  3. * @author WanJl
  4. * @version 1.0
  5. * @title MyLinkdeList
  6. * @description
  7. * @create 2025/7/22
  8. */
  9. public class MyLinkList {
  10. public static void main(String[] args) {
  11. Node node = new Node();
  12. Node node1=new Node();
  13. node.Last=null;
  14. node.data="扎根三";
  15. node.next=node1;
  16. node1.Last=node;
  17. node1.data="李四";
  18. node1.next=null;
  19. }
  20. }
  21. class Node{
  22. Node Last;
  23. String data;
  24. Node next;
  25. }