JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java 新手區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
作者 关于局部变量(local variable) 和类变量(field)问题不甚清楚,求教中

發文: 2
積分: 0
於 2006-04-19 15:15 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1)What is the difference between a local variable and a field? Describe how they are similar and how they are different
我知道变量的生命周期和有效范围不同,field是类变量,有效范围和生命周期是类,local variable是函数局部变量,它的范围和周期如何定义呢?还有他们相似之处,难道就是同为类吗?
2)Describe one situation where you should make a piece of data a field rather than a local variable. Why should this be done? i.e. why would you make something a field versus a local variable?

reply to postreply to post
You are under arrest for so and so reason. You have the right to remain silent.
Anything what you say can and will be used in the court of law against you.
人氣 標題 作者 字數 發文時間
690 关于局部变量(local variable) 和类变量(field)问题不甚清楚,求教中 松鼠乖乖 530 2006-04-19 15:15
» JWorld@TW »  Java 新手區

reply to postflat modego to previous topicgo to next topic
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8