您的位置:首页 > 其它

线性表节点

2015-06-07 16:11 134 查看
public class Node {
	private Object data;  //存放节点值
	private Node next;
	
	//无参数的构造方法
	public Node(){
		this(null, null);
	}
	
	public Node(Object data){
		this(data, null);
	}
	
	public Node(Object data, Node next){
		this.data = data;
		this.next = next;
	}
	
	public Object getData(){
		return data;
	}
	
	public Node getNext(){
		return next;
	}
	
	public void setData(Object data){
		this.data = data;
	}
	
	public void setNext(Node next){
		this.next = next;
	}
	

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: