How can I get multiple Strings from an ArrayList in a simplified way and merge into just one string variable? I'm new to Java and I'm having trouble completing this change in a simplified way, avoiding long, unnecessary lines of code.
List<String> fields_list = new ArrayList<String>();
Saída: ["Campo1, Campo2, Campo3"]
This should be my String variable:
String fields = "Campo1 Campo2 Campo3";