Java中可擴展性的實現

Java中可擴展性的實現 在JAVA中程序的可擴展性的實現有兩種,經過代碼舉例以下: 1、將基類類型做爲參數類型,使用instanceof判斷傳入實參引用的所屬類型,從而決定該執行那部分代碼 public class TestSimpleExtend { public static void main(String[] args) { TestSimpleExtend test = new Tes
相關文章
相關標籤/搜索