Creating a node class which will be used in LinkedList class.