使用instanceof,除了可以得知cat物件屬於Cat類別,也可判斷出cat物件與Animal類別有某種繼承關係。 使用instanceof,也可知道物件與實作類別的關係,像是 ...
確定! 回上一頁