Pregunta de entrevista de UKG

Write a method with its Junit test case.