Jump to content

ArrayList to string


Daviyow

Recommended Posts

Hey, my head just exploded. How can i pass this into a string for GroundItem? ex: GroundItem lewt = ("Huge turd", "Flashlight");

    public static ArrayList<String> GUILoot = new ArrayList<String>();

My arraylist outprints this atm:

 

[iNFO ][04/01/14 01:21:22 AM]: GUILoot: [Vial, Herb, Bones]

 

thanks!

 

Edited by daviyow
Link to comment
Share on other sites

can i do that in my getState? cus i have some checks for loot in my state or where would be the past part to do this

Wherever you think would be best. Forgot an ArrayList returned the string with brackets though, so you can just pass them in easy and replace the characters you don't want.

GUILoot.toString().replace("[", "").replace("]", "");
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...