I have an String array with multiple items.
String[] folder={"proc","root","sdcard","cache","system","config","dev","sys","acct","sbin","etc"};
Now I want to check in if condition like
if(list[i].getName().equals(object))
Is there any method that can check whole array and if list[i] present in array then go into the if condition block.
Thank you in advance.
For instance:
Arrays.asList(folder).contains("sdcard");
asList
: Returns a List of the objects in the specified array.contains
: Tests whether this List contains the specified object.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With