Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes deleting record Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "deleting record" Watch "deleting record" New topic

deleting record

Abhradeep Banerjee
Ranch Hand

Joined: Dec 09, 2009
Posts: 71
have pasted part of my code for delete
im not sure how to delete a record from linklist

all i know that i have to do a LL.remove();
not sure what to put in the brackets
i also want to put a index number next to each record when it displays
and when the user enters that number the program deletes the record

Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38474
Why are you using a LinkedList rather than an ArrayList which allows random access?
subhash kumar
Ranch Hand

Joined: Jul 14, 2010
Posts: 63

Subhash Kumar
Attitude is everything
Abhradeep Banerjee
Ranch Hand

Joined: Dec 09, 2009
Posts: 71
mine doesn't really work like that mine is in a text file
ill paste the whole code

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: deleting record