What would be the most efficient way to construct a new String using a Character[]? It's easy enough to do with the primitive char[], but unfortunately the String constructor does not include an option for Character[]. Converting to a char[] seems cumbersome. Is there any efficient way to construct the String with just the Character[]?
Thanks.
StringBuilder s = new StringBuilder(chars.length())followed by a loop whose body callss.appendis as efficient as you’re likely to get. Any shorter solutions will be doing the equivalent at best.