<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.paulbui.net/wiki/index.php?action=history&amp;feed=atom&amp;title=AnotherNodeDemo.java</id>
	<title>AnotherNodeDemo.java - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.paulbui.net/wiki/index.php?action=history&amp;feed=atom&amp;title=AnotherNodeDemo.java"/>
	<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=AnotherNodeDemo.java&amp;action=history"/>
	<updated>2026-10-23T10:51:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.8</generator>
	<entry>
		<id>https://www.paulbui.net/wiki/index.php?title=AnotherNodeDemo.java&amp;diff=14052&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;&lt;syntaxhighlight lang=&quot;Java&quot;&gt; public class AnotherNodeDemo { 	public static void main(String [] args) 	{ 		Node n1, n2, n3, n4; 		 		//Draw the memory diagram at this point...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.paulbui.net/wiki/index.php?title=AnotherNodeDemo.java&amp;diff=14052&amp;oldid=prev"/>
		<updated>2017-11-14T15:09:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;Java&amp;quot;&amp;gt; public class AnotherNodeDemo { 	public static void main(String [] args) 	{ 		Node n1, n2, n3, n4; 		 		//Draw the memory diagram at this point...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;Java&amp;quot;&amp;gt;&lt;br /&gt;
public class AnotherNodeDemo&lt;br /&gt;
{&lt;br /&gt;
	public static void main(String [] args)&lt;br /&gt;
	{&lt;br /&gt;
		Node n1, n2, n3, n4;&lt;br /&gt;
		&lt;br /&gt;
		//Draw the memory diagram at this point&lt;br /&gt;
		&lt;br /&gt;
		n1 = new Node(7);	&lt;br /&gt;
		n1.next = null;&lt;br /&gt;
		&lt;br /&gt;
		n2 = new Node(86);	&lt;br /&gt;
		n2.next = n1;&lt;br /&gt;
		&lt;br /&gt;
		//Draw the memory diagram at this point&lt;br /&gt;
		&lt;br /&gt;
		n4 = new Node();&lt;br /&gt;
		n3 = new Node();&lt;br /&gt;
		&lt;br /&gt;
		n4.next = n3;&lt;br /&gt;
		n3.data = 9;&lt;br /&gt;
		n4.data = 530;&lt;br /&gt;
		&lt;br /&gt;
		n1.next = n4;&lt;br /&gt;
		&lt;br /&gt;
		//Draw the memory diagram at this point&lt;br /&gt;
		&lt;br /&gt;
		print(n2);&lt;br /&gt;
		&lt;br /&gt;
		//What is printed?&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	//This print method prints out all the nodes connected to each other&lt;br /&gt;
	public static void print(Node head)&lt;br /&gt;
	{&lt;br /&gt;
		//currentNode is a reference that is used to iterate through the nodes&lt;br /&gt;
		for(Node currentNode = head; currentNode != null; currentNode = currentNode.next)&lt;br /&gt;
		{&lt;br /&gt;
			System.out.print(currentNode.data + &amp;quot; &amp;quot;);&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>