Pregunta de entrevista de Tata Consultancy Services

Java code based on 2 arrays find the elements same in both arrays,