Infosys interview question

Write any code with Groovy scripting.