How to convert string to char array in java?
public class StringToCharArrayExample{
public static void main(String args[]){
String s1=""hello"";
char[] ch=s1.toCharArray();
for(int i=0;i<ch.length;i++){
System.out.print(ch[i]);
}
}}
🔗Reference : stackoverflow.com
🔗Source: Java Interview Questions and Answers
🔗Reference: Javatpoint.com