One of the most comprehensive repositories you'll find is from the book Java Coding Problems by Anghel Leonard, published by Packt. The repository provides over covering fundamental areas such as strings, numbers, arrays, collections, data structures, date and time, functional programming, concurrency, and the HTTP Client API.
Writing code that is modular, extensible, and easy to maintain. 3. Concurrency and Multithreading