Hello i have an array that is filled with values from database and those values i want to assign them to strings i did this code but its making error:
String[] options = s.split(",");
String visible = options[0];
String sms = options[1];
String contact = options[2];
String calllogs = options[3];
I want the values to separate in array and then by index position to delcare them on each string.
>Solution :
You could use this Technique.
String s = "1000";
String[] options = new String[s.length()];
for(int i=0; i< s.length(); i++)
options[i] = Character.toString(s.charAt(i));
But since you are storing chars the array could be declared as char array