- package day03_24;
- public class Zi extends Fu {
- private int c = 0;
- public Zi(int a, int b, int c) {
- super(a, b);
- this.c = c;
- }
- void show() {
- System.out.println(c);
- }
- public static void main(String[] args) {
- Zi z = new Zi(1,2,3);
- z.show();
- }
- }
- class Fu {
- private int a = 0;
- private int b = 0;
- public Fu(int a, int b) {
- super();
- this.a = a;
- this.b = b;
- }
- public void Fu() {
- }
- void show() {
- System.out.println("a" + a + "b" + b);
- }
- }
复制代码 |