how to use LinkedList

dmtulsa

Member
Licensed User
Longtime User
I there a sample of how to use a LinkedList? I'm trying to loop through all items in a LinkedList and add each item to a listview. If I understand correctly using LinkedList.get(index) returns an object and I can't add an object to a listview. I've tried stringbuilder.tostring(LinkedList.get(index)) but I get an error"array expected"

I have search the forum and I do not see any samples of using LinkedList other than a list of methods.

Thank you
Doug
 

wl

Well-Known Member
Licensed User
Longtime User
According Basic4android - CollectionsExtra

you can Add items to a linked list with the .Add method. I guess you can pass a string as its parameter.

The .Get(index) method will then return this object which you can assign to a string variable.
 
Upvote 0
Top