Java進階篇~動力節點(該文章是我的在B站上看動力節點視頻學習所作筆記)

面向對象 toString重寫 代碼演示: public class Test01 { public static void main(String[] arg) { MyTime my = new MyTime(1000,2,3); //未改寫toString方法以前輸出結果爲:MyTime@54bedef2 //第一種: //System.out.println(my.to
相關文章
相關標籤/搜索