Problem Statement
We have been given a List of characters that contains each character of the author’s name. Our task is to concatenate them and return the author name as String.
Example
author chars = { 'S', 'A', 'M' }
output => "SAM"
Before jumping to a solution consider giving an attempt
Solution
StringBuilder sb = new StringBuilder();
chars.forEach(sb::append);
sb.toString();
List<Character> authorChars = Arrays.asList('S', 'A', 'M');
String authorName = chars
.stream()
.map(a -> "" + a)
.collect(Collectors.joining());
Conclusion