How to convert toCharArray to string in Java