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
Post a Comment