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