📄 example3_8.java
字号:
/* 子类重写了父类的方法 */
import java.io.*;
class A
{
void callme( )
{
System.out.println("A类中的callme()方法");
}
}
class B extends A
{
void callme( )
{
System.out.println("B类中的callme()方法");
}
}
public class Example3_8
{
public static void main(String args[])
{
A a=new B();
a.callme( );
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -