Tech Mahindra interview question

Is Anagram, Java 8, OOPS