Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Foo {
- String getText() {
- return "Text from foo";
- }
- }
- class Bar extends Foo {
- @Override
- String getText() {
- return "BAR> " + super.getText() + " <BAR";
- }
- }
- class Bar {
- Foo foo;
- String getText() {
- return "BAR> " + foo.getText() + " <BAR";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement