InnovationM Interview Question

find the output of java code