java instanceof 與 isInstanceof 的用法

僞代碼以下:ui Fruit fruit = new Fruit(); Price price2 = null; Price price1 = new Price(1,"2",new BigDecimal(2)); boolean instance = Price.class.isInstance(fruit); System.out.println(instance); if (price2 i
相關文章
相關標籤/搜索