面向對象編程基礎

this關鍵字 當類中的成員變量與成員方法中的參數重名時,使用this,來使用類中的成員變量;不用的話,就是成員方法中的參數web public class test { String name="abc"; public void showName(String name) { System.out.println(name); } public static void main(S
相關文章
相關標籤/搜索