Skip to content

Instantly share code, notes, and snippets.

@kasramp
Created August 3, 2020 20:26
Show Gist options
  • Save kasramp/f32d11c37d84aa14c41505c7c105646f to your computer and use it in GitHub Desktop.
Save kasramp/f32d11c37d84aa14c41505c7c105646f to your computer and use it in GitHub Desktop.
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