How to convert an ArrayList to a String in Java?
The toString method returns it as [a,b,c] string - I wa
How about this, Building the list
List charsList = new ArrayList();
charsList.add('h');
charsList.add('e');
charsList.add('l');
charsList.add('l');
charsList.add('o');
Actual code to get String from List of Character:
String word= new String();
for(char c:charsList){
word= word+ c;
}
System.out.println(word);
Still learning if there is a misake point out.