-
-
Save kasramp/f32d11c37d84aa14c41505c7c105646f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface MyInterface { | |
public void calc(); | |
public int rt(); | |
} | |
public class MySuperClass { | |
public int sum(int x, int y) { | |
return y + x; | |
} | |
public int minus(int x, int y) { | |
return x - y; | |
} | |
} | |
public class MySubclass extends MySuperClass implements MyInterface { | |
private int x; | |
private int x; | |
@Override | |
public int sum(int x, int y) { | |
this.x = x; | |
this.y = y; | |
return x + y; | |
} | |
@Override | |
public int rt() { | |
return this.x * this.y; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment