Friday, April 04, 2025

2007/08/14

Encapsulation


所謂Encapsulation(封裝)就是對屬性(field)設定成private,不讓其他人直接存取,以免無法檢查別人所設定的值,而提供set method和get method來讓其他人設定及取其值,而不至於讓別人可能輸入錯誤的值與破壞整個值。

0 comments:

張貼留言

Followers

人氣

   my space tracker
   HP Pavilion

 

Jake Hsiao--Self-trust is the first secret of success.. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com