secret 發表於 2007-7-10 18:00:51

原帖由 henrytam 於 2007-7-1005:59 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

冇乜理由掛:icon032:
3年唔讀summer應該都實夠畢業:icon032:

我地d科唔同你地:icon074:

ic421 發表於 2007-7-10 18:02:30

原帖由 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:

麥旋風 發表於 2007-7-10 18:04:20

原帖由 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:

麥旋風 發表於 2007-7-10 18:05:16

原帖由 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:

麥旋風 發表於 2007-7-10 18:06:01

原帖由 henrytam 於 2007-7-1006:00 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

summer讀書,懶極有限:bye: :bye: :bye: :icon057:
咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:

secret 發表於 2007-7-10 18:06:58

原帖由 麥旋風 於 2007-7-1006:04 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

明白
咁abstract呢?
如果唔用abstract
subclasses唔可以用同名既method?:confused:
未溫到...:icon101:

AirKID 發表於 2007-7-10 18:10:39

原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:

做下part time拍下拖:icon101:

麥旋風 發表於 2007-7-10 18:11:47

原帖由 secret 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

未溫到...:icon101:
溫完話我知:icon101:

ic421 發表於 2007-7-10 18:13:24

原帖由 麥旋風 於 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.

麥旋風 發表於 2007-7-10 18:13:35

原帖由 AirKID 於 2007-7-1006:10 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif


做下part time拍下拖:icon101:
拍拖就免啦
起碼自由埋依一年先:icon101:

part time...
一來唔等錢駛
二來番工遲下大把有得番
唔駛急於一時:icon101:

麥旋風 發表於 2007-7-10 18:14:46

原帖由 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:

secret 發表於 2007-7-10 18:16:43

原帖由 麥旋風 於 2007-7-1006:11 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

溫完話我知:icon101:
溫完都未必識:icon101:

hehe0114 發表於 2007-7-10 18:17:00

點呀你地:icon092:

secret 發表於 2007-7-10 18:18:10

原帖由 hehe0114 於 2007-7-1006:17 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif
點呀你地:icon092:
臨時變為java教學:mad:

ic421 發表於 2007-7-10 18:21:10

原帖由 麥旋風 於 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:

secret 發表於 2007-7-10 18:32:36

原帖由 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:

henrytam 發表於 2007-7-10 18:44:35

原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
冇野做會搵書讀的話證明你地係好學生:icon058: :icon059: :icon057: :icon101:

water_long 發表於 2007-7-10 18:45:42

原帖由 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:

secret 發表於 2007-7-10 18:50:24

原帖由 henrytam 於 2007-7-1006:44 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

冇野做會搵書讀的話證明你地係好學生:icon058: :icon059: :icon057: :icon101:
:icon086:

Keith 發表於 2007-7-10 20:17:20

原帖由 麥旋風 於 2007-7-1006:06 PM 發表 http://hkcm.hkehost.net/forum/images/common/back.gif

咁反正冇野做姐
唔通真係淨係上黎HKCM咩:icon101:
你升yr2定yr3?:icon101:
頁: 1 2 3 [4] 5
查看完整版本: 黨派制諮詢 2 - 季尾安排 [秘密方案]