w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
String getChars() method confusion

You get an IndexOutOfBoundsException because you have run out of room in the destination array tempCharArray, which is of length len. To copy the array, have getChars start in the destination array at the beginning of the array, at index 0.

palindrome.getChars(0, len, tempCharArray, 0);  




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.