Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

string array to stringbuilder array java

String[] str = new String[] {"hi","hello"};
StringBuilder[] sbs=Arrays.stream(str)
                          .map(s->new StringBuilder(s))
                          //.collect(Collectors.toList()) // not needed, see comments
                                                          // of @RealSkeptic and @Holger
                          .toArray(StringBuilder[]::new);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #array #stringbuilder #array #java
ADD COMMENT
Topic
Name
4+7 =