daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest May 16th, 2018 109 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class ListNode<T> {
  2.     private ListNode<T> next;
  3.     private T val;
  4.    
  5.     public ListNode(T val, ListNode<T> next){
  6.         this.val = val;
  7.         this.next = next;
  8.     }
  9.    
  10.     public void setNext(ListNode<T> next){
  11.         this.next = next;
  12.     }
  13.    
  14.     public void setVal(T val){
  15.         this.val = val;
  16.     }
  17.    
  18.     public T getVal(){
  19.         return val;
  20.     }
  21.    
  22.     public ListNode<T> getNext(){
  23.         return next;
  24.     }
  25.    
  26.     public String toString(){
  27.         return val.toString();
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top