java这个super语句什么意思protected void paintComponent(Graphics g){super.paintComponent(g);g.drawLine(0,0,50,50);}

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/06 18:36:19
java这个super语句什么意思protected void paintComponent(Graphics g){super.paintComponent(g);g.drawLine(0,0,50,50);}
xPJ@,(M7qƟ# IRHh)( -%A( 133_L6".<#B}:I1#9(u'tmEz&shmBCWtcu-N̠%xWӕFnnUw)~) Ġ(@IŠu\#|gHf %)yw8IV#x2 wUj|S2AoaE:(ž9aH'c-%_Bz=8 v E}̣F,tj(

java这个super语句什么意思protected void paintComponent(Graphics g){super.paintComponent(g);g.drawLine(0,0,50,50);}
java这个super语句什么意思
protected void paintComponent(Graphics g)
{
super.paintComponent(g);
g.drawLine(0,0,50,50);
}

java这个super语句什么意思protected void paintComponent(Graphics g){super.paintComponent(g);g.drawLine(0,0,50,50);}
java中的多态有重写
方法被子类重写后 父类的原方法就会被影藏
当你又需要调用父类所定义的原方法
这个时候就可以用super来调用