| Introduction to OOP | Chapter 16: Overriding : | next | previous | audio | real | text |
class Anchor {
public void printAnchor () {
print('<A href="http:');
inner;
print('">');
}
}
If we create an instance and class printAnchor, the output we expect will
be produced.
Anchor a = new Anchor(); a.printAnchor(); <A href="http:">