原帖由 henrytam 於 2007-7-1005:59 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
冇乜理由掛:icon032:
3年唔讀summer應該都實夠畢業:icon032:
我地d科唔同你地:icon074:
原帖由 secret 於 2007-7-1005:59 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
其實除左main之外,其他都好笑會用static..static通常係做d無咩變化ge野,
或者咁講,無野係一定要用static先做到.:icon101:
o岩o岩 quit 左自己公司個 IDE
無啦啦入到黎見到 Java 野
嚇死 :icon101:
老旋係唔係唔識分 static variable 同 instance variable? :icon101:
原帖由 secret 於 2007-7-1005:59 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
其實除左main之外,其他都好笑會用static..static通常係做d無咩變化ge野,
或者咁講,無野係一定要用static先做到.:icon101:
明白
咁abstract呢?
如果唔用abstract
subclasses唔可以用同名既method?:confused:
原帖由 ic421 於 2007-7-1006:02 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
o岩o岩 quit 左自己公司個 IDE
無啦啦入到黎見到 Java 野
嚇死 :icon101:
老旋係唔係唔識分 static variable 同 instance variable? :icon101:
應該係:icon101:
原帖由 henrytam 於 2007-7-1006:00 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
summer讀書,懶極有限:bye: :bye: :bye: :icon057:
咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
原帖由 麥旋風 於 2007-7-1006:04 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
明白
咁abstract呢?
如果唔用abstract
subclasses唔可以用同名既method?:confused:
未溫到...:icon101:
原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
做下part time拍下拖:icon101:
原帖由 secret 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
未溫到...:icon101:
溫完話我知:icon101:
原帖由 麥旋風 於 2007-7-1006:05 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
應該係:icon101:
簡單講:
instance variable: 每個 instance 一個
static variable: 每個 class 一個
Example of instance variable:
class of "horse" has an instance variable called "hair_color"
you can have a few instance of horses,
horse number one "hair_color" = WHITE
horse number two "hair color" = BLACK
Example of static variable:
class of "horse" has a static variable called "no_of_legs"
once you set "no_of_legs" = 4
all horses have got 4 legs.
原帖由 AirKID 於 2007-7-1006:10 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
做下part time拍下拖:icon101:
拍拖就免啦
起碼自由埋依一年先:icon101:
part time...
一來唔等錢駛
二來番工遲下大把有得番
唔駛急於一時:icon101:
原帖由 ic421 於 2007-7-1006:13 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
簡單講:
instance variable: 每個 instance 一個
static variable: 每個 class 一個
Example of instance variable:
class of "horse" has an instance variable called "hair_color"
you can have a few instanc ...
咁同final有咩分別?:confused:
原帖由 麥旋風 於 2007-7-1006:11 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
溫完話我知:icon101:
溫完都未必識:icon101:
點呀你地:icon092:
原帖由 hehe0114 於 2007-7-1006:17 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
點呀你地:icon092:
臨時變為java教學:mad:
原帖由 麥旋風 於 2007-7-1006:14 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
咁同final有咩分別?:confused:
final o既意思係 once 呢個 variable 被 initialize 佢o既 value 就 set 死左係果個
同 static / instance variable 係冇抵觸的
即係咁
public static int NO_OF_LEGS = 4;
呢個就係我頭先講o既 example,once 你 state 左係 4,去到邊度 "馬" 都有四隻腳
ok,fine,而家你話我知全地球所有四腳馬死晒,變晒做五腳馬,then 你 call 一句
HORSE.NO_OF_LEGS = 5;
搞掂晒 :icon071:
如果
你知道上帝唔會玩野到要d 四腳馬滅亡
佢一定只係做四腳馬的話
你就咁寫:
public static final int NO_OF_LEGS = 4;
:icon101:
原帖由 ic421 於 2007-7-1006:21 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
final o既意思係 once 呢個 variable 被 initialize 佢o既 value 就 set 死左係果個
同 static / instance variable 係冇抵觸的
即係咁
public static int NO_OF_LEGS = 4;
呢個就係我頭先講o既 example,once 你...
高手:icon065:
原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
冇野做會搵書讀的話證明你地係好學生:icon058: :icon059: :icon057: :icon101:
原帖由 ic421 於 2007-7-1006:21 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
final o既意思係 once 呢個 variable 被 initialize 佢o既 value 就 set 死左係果個
同 static / instance variable 係冇抵觸的
即係咁
public static int NO_OF_LEGS = 4;
呢個就係我頭先講o既 example,once 你...
x!我應該係呢度問java:icon092:
原帖由 henrytam 於 2007-7-1006:44 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
冇野做會搵書讀的話證明你地係好學生:icon058: :icon059: :icon057: :icon101:
:icon086:
原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
你升yr2定yr3?:icon101: