linkedlist.java

来自「LINKED LIST OF JAVA, use abstrct classes」· Java 代码 · 共 37 行

JAVA
37
字号


public class LinkedList extends ADTLinkedList
{

	public LinkedList()
	{
			firstNode = null;

	}

	public void insertNode(ADTNode item)
	{
			firstNode=item;
	}

	/* Print out the elements */
	public void printAllNodeInReverse()
	{

			ADTNode index=this.getFirstNode();

			while(index != null)
			{
					System.out.print((Character) index.getElement());
					index=index.getNext();
			}

	}

	/* Get out the first node content */
	public ADTNode getFirstNode()
	{
			return firstNode;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?