How do you check if a String is in a list in Java?

ArrayList. contains() method can be used to check if a Java ArrayList contains a given item or not. This method has a single parameter i.e. the item whose presence in the ArrayList is tested. Also it returns true if the item is present in the ArrayList and false if the item is not present.

Sizin İçin Seçtik  Enflasyon yükselince faiz düşer mi?

Leave a Reply

Your email address will not be published. Required fields are marked *