Added warning to toString function of ArrayList and SinglyLinkedList