public boolean put(int key,int value){
        LinkedNode root = this;
        if(root == null){
            return false;
        }
        while(root.getNext()!=null){
            if(root.getKey() == key)
                return false;
            root = root.getNext();
        }
        if(root.getKey() == key)
            return false;
        root.setNext(new LinkedNode(key,value));
        return true;
    }