When we search for an element in an array, we may be interested to find out the index at which this element occurs, or only whether it is present in the array. The solutions presented in this section are materialized in the methods from the following screenshot:
Let's take a look at the different solutions in the next sections.