Skip to content

By Value v.s. By Reference

by value (primitive type)

copying the value into two separate spots in memory

by reference (all objects)

no copy of object is created, instead, two names or more point to same address

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *