
class VijayKrishna
{
public static void main(String args[])
{
String palindrome = "Dot saw I was Tod";
int len = palindrome.length();
char tempCharArray[] = new char[len];
char charArray[] = new char[len];
palindrome.getChars(**0, len, tempCharArray, 0**);
System.out.println(tempCharArray);
}
}
plz explain the bold ones in the statement palindrome.getChars(0, len, tempCharArray, 0); what do they represent?

In the method getChars(,
0 denotes the source index of the string.
len is the length of the array or you can say the destination index of the string.
tempCharArray is destination character array where the selected string from source to destination index is stored in the form of array.
0 denotes the index from which you can display the destination array.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.