Tech Mahindra interview question

Write code in java to fetch the first unique character in a word