TA贡献3条经验 获得超1个赞
++是有两种情况的,如:
a++;
++a;
这两个语句在不赋值时,两个语句执行完后,都是自加 1。
但是:
a = 1;
b=a++;
和
b=++a;
是不同的,前者b = 1,a = 2;
后者b = 2, a = 2;
两者最大区别就是先运算再赋值,还是先赋值再运算!
所以:
score++;可以写成score = ++score;
不能写成score = score++;
TA贡献868条经验 获得超0个赞
SCHJUWYSO
DZBQIBRQX
AOTBWGPFC
LMDRWPPIB
LCKMXQWZJ
ZDZRPSOBR
FWBSOOONQ
GKSWODGGT
YJRQLMMPV
TKZHMEOXK
RYKCKGZYR
EPNMHTQZW
ABJCKQGCS
RSGLDERTD
AUDECSLWW
CQHBDCMOI
KYWFNTWCO
HLKCUCELH
LCHPOKMSR
EJXWUURKK
OZOMKSCBE
JNCHFLVUB
WDCAPYUDA
PGONJWLVO
DBJVQHUXX
GUMXFFYRH
RWOCRKREK
SPBMIRCCV
PXSGFINHA
ZRWPNDZIC
UFJSAJMIZ
LLQYHQPHK
QVLGMSMTB
FGPNXGWFY
YZEENCSLF
NETKZFOEB
NYDBJTPRH
TOMHFBBUD
VGLZOIOOE
SHIKVYEQA
KIEGFZJRC
KOXPDGMWC
OIDIXWJIC
RSDFHYYHO
WGFXFOOHH
XBAPRXZCB
EPHDLYBOX
JECAJPYIO
OWOOWSIBO
WHFACCBOB
NEDBDZZIO
OIIXLVOUX
DUJOZZYER
SSBWWZYOR
RVECYHHQD
XRAVNGTJW
LLZIQGSYV
QHPHWFVKZ
STBAFUEXL
SARDFEHEW
HYEWYXXDG
STRPOQKJL
NOJPEKDGQ
NBNJLOLCC
LDSPFMZPG
IQLBQMPMJ
QHNZVRBPG
AYUJSPZJU
WEDMIVPKO
HLHJYVJZL
YNUZLFIVM
EZEQVWNEE
ZXDCOCZMW
GLGMYBFMW
WLGCBOSDO
WAWFUUKZK
FUGPEJWAK
OCHNZPLVC
KMOJVCMPX
JWYNTGAJG
MNDOUNUBV
ZQWFUOBIP
ULXQTXKRR
THFUZREPC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一站式精讲
再学经典:《Effective Java》独家解析
举报