Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (10.2k points)

List<String> ids = new ArrayList<String>();

ids.add("1");

ids.add("2");

ids.add("3");

ids.add("4");

Now i want an output from this list as 1,2,3,4 without explicitly iterating over it.

1 Answer

0 votes
by (46k points)

On Android use:

android.text.TextUtils.join(",", ids);

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...