Agilysys Interview Question

Java, write a code for string