Java tricky program 2 for interviews | Find the output