copy string in java 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);
}
}