It's not terribly clean, but you could use indexOf() and check if it returns -1. Better than breaking out a loop.
Community driven content discussing all aspects of software development from DevOps to design patterns. Follow these steps to find the length of a String in Java: Declare a variable of type String ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results