Continental interview question

java basics like oops concepts