Birlasoft interview question

From a large string print the elements between these indices ( provided by interviewer) write in Java

Interview Answer

Anonymous

9 Oct 2017

Took a string builder and concatenated to it all the index variables.