X1273: Contains (with linear search)

Complete the following contains method so it returns true if the value being searched is found in the array, or false otherwise. You must use a linear search to find the value. It is unspecified if the array is ordered or not, so assume it is not.

Examples:

contains({1,7,4},7) -> true
contains({1,7,4},5) -> false

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.