It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
This workshop implements exercises with one-dimensional arrays, matrices, and dynamic lists (ArrayList) in Java. It was developed applying principles of Object-Oriented Programming (OOP), Clean Code, ...
ArrayLists: ArrayLists are part of Java's "java.util" package and provide a resizable array implementation. Unlike arrays, ArrayLists can dynamically grow and shrink as elements are added or removed.
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する