Skip to main content

println

public class LinkedListProgFromScratch {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
       
        ListNode p=new ListNode("hello",null);
        System.out.println(p);
       
        ListNode q=new ListNode("goodbye",p);
        System.out.println("q is.."+q);
       
        System.out.println("p's value is..."+p.getValue());
        System.out.println("q's value is..."+q.getValue());
        System.out.println("q points to node p..."+p.getNext().getValue());
        System.out.println("q points to node p..."+q.getNext());
       
       
    }
   
}