Infosys interview question

Split the given string into three parts. java program