⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 superdemo.java

📁 《Java语言程序设计》源代码 很好的JAVA入门的好的代码
💻 JAVA
字号:
class A{
int x,y;
public A(int x,int y){
	   this.x=x;
	   this.y=y;
}
public void display(){
	   System.out.println("In class A: x="+x+" , y="+y);
}
}
class B extends A{
int a,b;
public B(int x,int y,int a,int b){
	   super(x,y);
	   this.a=a;
	   this.b=b;
}
public void display(){
	   super.display();
	   System.out.println("In class B: a="+a+" , b="+b);
}
}
public class SuperDemo{
public static void main(String[]args){
	   B a=new B(1,2,3,4);
	   a.display();
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -