android - Compare a value with all the values in arraylist in java -


in case arraylist contains user define timings like{12:23,15:40,17:17...}. how can print message when system time equal user timings.

first make array below code

string s = "{12:23,15:40,17:17...}"; string newstring = s.replace("{").replace("}");  int size = stringutils.countoccurrencesof(newstring , ",");  string[] arraystring = new string[size]; 

now compare

for(int i=0; i<size; i++){  if(yoursystemtime.equals(newstring.split(",")[i])){ toast.maketext(context, "equal", toast.lenght.short).show(); } } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -