I would like to convert the string to string array in java. I tried the following method to achieve this. But its not working as expected.
String right_country = "BH, MY, SG, IN, AE";
String[] ritcountry_ary = new String[] {right_country};
When try to print the above array this is what i am getting.
for(int i=0 ;i<=countries.length - 1; i++){
System.out.println("o"+countries[i]);
}
output:oBH, MY, SG, IN, AE
But I need something like the following.
oBH oMY oSG oIN oAE