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

📄 example3_8.java

📁 书中的例题
💻 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 + -