I want to check which part of string is equal to text, from part 0 to count
.
So I tried this:
int count = 1;
int city = 0;
String finall = "gggg,dddd";
String[] separated = finall.split(",");
for (int i = 0; i < count; ++i)
if (selectedCities.equals(separated[i])){
city = 1;
}
How to increment each time the i in 1 until it reaches the value of count
?
int count = separated.length
. is this what you want??