Created
May 8, 2022 09:07
-
-
Save prasath95/4b5b97579b263cce4ca52654ed8ec33b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LinkedList { | |
Node headNode; | |
/* | |
* show/Display | |
* */ | |
public void show(){ | |
//1.1 | |
Node n=headNode; | |
//1.2 | |
while (n.nextNode!=null){ | |
//1.3 | |
System.out.println(n.value); | |
//1.4 | |
n=n.nextNode; | |
} | |
//1.5 | |
System.out.println(n.value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment