HCLTech interview question

Write a code to show the OOPS concept