Eurofins interview question

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