Skip to main content
7 events
when toggle format what by license comment
Jul 26, 2017 at 9:43 comment added xander In that case I'd use a debugger and step throught the code of your fetch method to see what's going on, maybe it's not even the fetch method itself but the data in your list is corrupted from another operation and it fails because of that, so the debugger is your friend in cases like this. :)
Jul 26, 2017 at 9:40 comment added Engr_Ondigo My biggest issue is, why does it fetch the last inserted item just fine, but if I try to fetch the first or second item, it returns null even though the nodes are there.
Jul 26, 2017 at 9:36 comment added xander I just provided an example that is not meant as a replacement for your code. I suggest that you play around with the default provided List and LinkedList by the Java framework and how they behave and then think about how you implement your own version of it (I guess that is just a lesson for you since Java already has good implementations of what you want).
Jul 26, 2017 at 9:28 comment added Engr_Ondigo Thank you so much Xander for answering! I tried your given example and i have an issue of cannot find symbol since an interface is being used too. Am editing the code for betteer understanding.
Jul 26, 2017 at 9:22 history edited xander CC BY-SA 3.0
added 256 characters in body
Jul 26, 2017 at 9:16 review First posts
Jul 26, 2017 at 10:53
Jul 26, 2017 at 9:14 history answered xander CC BY-SA 3.0