Example program of topics

Please give one inheritance example with java code.