I do not think there is a faster way. But please correct me!
The String instance is supported by the char array. charAt () performs some index checks, which may be the reason for its slowness, than working with the array returned by toCharArray (). toCharArray () just makes the System.arraycopy () an array of support.
source share