==> H45.bbs@ptt.cc (!H45) 提到:
: ※ 引述《vrgigi.bbs@bbs.mgt.ncu.edu.tw (夏傑)》之銘言:
: : public class Test{
: : public static void main(String args[]){
: : Aa obj=new Aa(5);
: : System.out.println("Aa= "+obj.i);
: : }
: : }
: : class Aa{
: : int i=10;
: : public Aa(int i){
: : i=i;
: ^^^^
: this.i = i;
為什麼就不能i=i呢?
不是已經把原本的i=10改成i=5 了?
--
◎龍貓資訊天地(bbs.mgt.ncu.edu.tw)
◎[vrgigi]From: 218-160-91-50.dynamic.hinet.net
討論串 (同標題文章)