自动化__持续集成___java___重写
Posted 18513757531
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自动化__持续集成___java___重写相关的知识,希望对你有一定的参考价值。
一、代码如下
package www.wujianbotwo; class Door { int height= 200; int weight= 80; String material= "实木"; private void open() { // TODO Auto-generated method stub System.out.println("开门"); } public void close() { // TODO Auto-generated method stub System.out.println("关门"); } }
package www.wujianbotwo; public class SafeDoor extends Door { @Override //public void close() { // TODO Auto-generated method stub //super.close(); //} public void close() { // TODO Auto-generated method stub System.out.println("子类关闭"); } public void closeTwo() { // TODO Auto-generated method stub super.close(); } public void closeThre() { // TODO Auto-generated method stub this.close(); } public void lock() { // TODO Auto-generated method stub System.out.println("子类锁门"); } }
-generated method stub Door door= new Door(); //door.open(); System.out.println(door.hashCode()); SafeDoor sdoor= new SafeDoor(); //sdoor.open(); sdoor.lock(); sdoor.close(); sdoor.closeTwo(); sdoor.closeThre(); } }
以上是关于自动化__持续集成___java___重写的主要内容,如果未能解决你的问题,请参考以下文章