I have shared my thoughts on a famous interview questions How substring works in Java , what is tricky is that even though its most common methods not every java developer know how internally it works and how it could lead to memory leak and prevent large strings from being Garbage Collected.