Amdocs interview question

Write unix commands Java code to reverse string