I'm trying to save string in to a character array using the below code & im getting this error: Type mismatch: cannot convert from char to char[]
Below is the code
public class ExCaluculator{
char[] swi=new char[10];
String San="hello world" ;
int samsu ;
public void excal(){
for(samsu=0;samsu>San.length();samsu++)
{
swi=San.charAt(samsu);
}
}
}
Also please suggest me any other methods to do the same
charto andchar[]!swi[samsu]or just useString.toCharArray().