i want to read this string
String "abc;def;ghi;jklm;nopqr"
i want to get these diffrent diffrent
string a = abc;
string b = def;
string c = ghi;
string f = nopqr;`
how i read this , plz help me,
i want to read this string
String "abc;def;ghi;jklm;nopqr"
i want to get these diffrent diffrent
string a = abc;
string b = def;
string c = ghi;
string f = nopqr;`
how i read this , plz help me,
You can use the split method:
String[] tokens = str.split(";")
for example:
String myString = "abc;def;ghi;jklm;nopqr";
String[] tokens = myString.split(";")
//tokens[0]="abc"
//tokens[1]="def"
//...
Try this:
String string = "aaa;bbb";
String[] parts = string.split(";");
String part1 = parts[0]; //aaa
String part2 = parts[1];//bbb