0

I have an array list, in that array list have values like 3-00,4-00,5-00.these three values stored as a comma separated string in database. Now when i click list view these values display in alert's dialog list view one by one like

3-00
4-00
5-00

But, now displaying 3-00,4-00,5-00. Give me any example snippet for display array List values in list view.

1
  • 1
    time is an array, you cannot split an array. Commented Dec 29, 2014 at 7:46

1 Answer 1

2

Try like this:

String str="";
    String[] time = new String[timList.size()];
    time = timList.toArray(time);           
     //String[] strList = time.split(",");// here give an error at **time.split(",")**            
    for(String splstr: time )
    { 
        str=splstr.toString();
    }
Sign up to request clarification or add additional context in comments.

1 Comment

hi, i tried this one, but string is not split,i have an array list, in that comma separated string is there,Now i want to split that string, any logic is there???

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.