Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
682 B
1
Indexable
Never
public class IntNode
{
    private int info;
    private IntNode next;
    
    public IntNode(int x)
    {
        this.info = x;
        this.next = null;
    }
    
    public IntNode(int x, IntNode next)
    {
        this.info = x;
        this.next = next;
    }
    
    public IntNode getNext()
    {
        return(this.next);
    }
    
    public void setNext(IntNode next)
    {
        this.next = next;
    }
    
    public int getInfo()
    {
        return(this.info);
    }
    
    public void setInfo(int x)
    {
        this.info = x;
    }
    
    public String toString()
    {
        return "" + this.info;
    }
}
Leave a Comment