Microsoft Interview Question

Q: realize substring in Java