Answers for "char array substring java"

0

char array substring java

Try the String(char[], int, int) constructor:

String s = new String(a, 2, 4);
That will construct a String from the characters of array a starting at offset 2 and a length of 4.
Posted by: Guest on December-12-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language