how to copy a string in ja code example
Example: java string copy characters
public class Demo {
public static void main(String []args) {
char[] arr = { 'p', 'q', 'r', 's' };
String str = String.copyValueOf(arr, 1, 2);
System.out.println(str);
}
}