Eurofins Interview Question

I found difficult que in java..rest all are easy