
public class StackLinked<T> {

	private LinkedList<T> list =new LinkedList<>();

	
	public boolean isEmpty(){
		return list.isEmpty();
	}
	public boolean push(T data){
		return list.add(data);
	}
	
	public boolean pop(){
		if(isEmpty()){
			return false;
		}
		return list.delete(list.getSize()-1);
	}
	public T top(){
		if(isEmpty())
			return null;
		
		return list.getIndexData(list.getSize()-1);
	}
	
	public void print(){
		list.print();
	}
	
	

}
