How SubString method works in Java | Hacker News Reader