IBM interview question

oops java concepts