Hello forum: D I have a question: is there any way to enter elements in any position of an array?
This code allows me to duplicate the parts I want, but I want the duplicate to be able to put it in the desired part of the character array
System.out.println("Ingrese los parámetros : ");
a = scan.nextInt();
b = scan.nextInt();
String resultado="";
char[] aCaracteres = adn.toCharArray();
for (i = 0; i < aCaracteres.length; i++)
System.out.print(aCaracteres[i]);
for (; a < aCaracteres.length && a <= b; a++) {
System.out.print(aCaracteres[a]);
}
}
}