zoukankan      html  css  js  c++  java
  • 【自动化__持续集成】___java___重载

    一、代码如下

    package www.wujianbotwo;
    
    import java.util.concurrent.locks.Lock;
    
    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("子类锁门");
    	}
    	
    	public  void lock(int i) {
    		// TODO Auto-generated method stub
    		System.out.println("子类锁门:" + i);
    	}
    	
    }
    
    package www.wujianbotwo;
    
    public class TestDoor {
    
    	public static void main(String[] args) {
    		// TODO Auto-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();
    		sdoor.lock(9);
    	}
    
    }
    
  • 相关阅读:
    上海python14期第一次周考
    day05总结
    day05作业
    day04总结
    js判断是安卓还是Ios
    移动端 --- 阻止浏览器点击图片会预览的方法
    meta标签禁止打电话 转载
    mac 常用命令
    ajax. 通过后台接口 渲染数据
    vue prop
  • 原文地址:https://www.cnblogs.com/wujianbo123/p/7492092.html
Copyright © 2011-2022 走看看