public String GetInfoFirstItem() { if (first != null) { return(first.getItem().ToString()); } else { return("there is no first item in the list");; } }
public String GetInfoThirdItem() { if (first != null) { Node second = first.getNext(); if (second != null) { Node third = second.getNext(); if (third != null) { return(third.getItem().ToString()); } else { return("there is no third item in the list");; } } else { return("there is no third item in the list");; } } else { return("there is no third item in the list");; } }