this關鍵字

(1)this調用本類方法 this()方法必須在構造方法中的第一行,使用this()調用構造方法時請留有出口,就是不要在全部的構造方法中都用this()。 public class Test { public static void main(String[] args) { // TODO Auto-generated method stub Person per=new Person("zh
相關文章
相關標籤/搜索