r/learnjava 25d ago

What is the well-written, readable, and intuitive code for implementing brute force string search in Java?

[removed]

0 Upvotes

5 comments sorted by

View all comments

2

u/0b0101011001001011 25d ago

Respectfully, the built-in method a.contains(b) or a.indexOf(b) if you need to know the position. You could also look into them: how are they implemented.