Flexera interview question

oops concepts in depth in java