Infosys Interview Question

Split the given string into three parts. java program