how to split string in java into char arry code example Example: java string to char array String str = "example"; char[] ch = str.toCharArray();