Java Array Substring Method In Apex