It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
Before we dive into what’s new with wrapper classes in Java 21, let’s do a quick review. Wrapper behavior was also refined as groundwork for Project Valhalla’s value types. Wrapper classes in Java 21 ...
一些您可能无法访问的结果已被隐去。
显示无法访问的结果