Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nina;
- public class poly
- {
- public abstract class FirstLayer {
- protected int aVariable;
- protected abstract void bla();
- public FirstLayer(int foo)
- {
- this.aVariable = foo;
- }
- }
- public abstract class SecondLayer extends FirstLayer {
- public SecondLayer(int foo)
- {
- super(foo);
- }
- }
- public class ThirdLayer extends SecondLayer {
- protected int otherVariable;
- public ThirdLayer(int foo, int otherVariable)
- {
- super(foo);
- this.otherVariable = otherVariable;
- }
- @Override
- protected void bla()
- {
- System.out.println("Im doing something..");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement