linklist.java

来自「this program is about logic and have 4 c」· Java 代码 · 共 38 行

JAVA
38
字号

public class linkList
{
    public    node first=new node();
    public    node last=new node();
    public    node help=new node();


    public linkList()
    {
       first=null;
      
    }
    public  node add(node temp)
    {


        if(first== null)
        {

            first=temp;
            last=temp;
        }
        else
        {
           help=temp;

           last.next=help;
           help.prev=last;
           last=help;
           help=new node();
        }

       return first;
    }
    
}

⌨️ 快捷键说明

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