How to Iterating all the Elements of a Linked List in java Get link Facebook X Pinterest Email Other Apps By Ritesh Sahu - June 08, 2016 /* Print elements of a linked list class Node { int data; Node next; } */ void Print(Node head) { while(head != null){ System.out.println(head.data); head = head.next; } } Get link Facebook X Pinterest Email Other Apps Comments
Comments
Post a Comment