How to add double quotes automatically, converting list of strings as comma separated value?
Tutorial
by Er Satya
How to add double quotes automatically, converting a list of strings as comma-separated values?
StringUtils only,List s = new ArrayList<>();
s.add("ten");
s.add("twenty");
s.add("thirty");
String step1 = StringUtils.join(s, "\", \"");// Join with ", "
String step2 = StringUtils.wrap(step1, "\"");// Wrap step1 with "
System.out.println(step2);
"ten", "twenty", "thirty"
More articles from same author:
More articles:
Recent lost & found:
Login for enhanced experience
Create and manage your profile
Refer an author and get bonus Learn more
Publish any lost and found belongings
Connect with the authors & add your review comments
Join us for Free to advertise for your business or
Contact-us for more details
Join us for Free to publish your own blogs, articles or tutorials and get your
Benefits
Discover your area of interest
Advertisement
Art & entertainment
Astrology & spirituality
Cooking
Culture
Current affairs
Education
Fashion
History
Hotel management
Industry
Medical & fitness
Motivational
Politics
Real life stories
Sports
Story & poetry
Technology
Top in search
Tourism
More recent categories
Taxi service(Public)
By: Dixit
Blockchain(Public)
By: Alexandra
Pentobarbital achat en Suisse(Public)
By: luc
Acheter Nembutal en France(Public)
By: luc
Euthanasie Nembutal Belgique(Public)
By: luc
Nembutal Achat en Belgique(Public)
By: luc
Nembutal achat en France(Public)
By: luc
Pentobabarbital achat France(Public)
By: luc
Euthanasie Nembutal en France(Public)
By: luc
Gold for sale(Public)
By: Tole
1 like
