12ー1復習

★ 下記、インスタンスフィールドへのアクセスをアクセサ経由に変更してください

 

 

アクセサのメリット1、readOnlyにできる

・メンバー変数をクラスの外に公開する理由は、値の設定だけではない。

 公開したい場合

Weak point on Public way-取得にしか使わないのに、外から変更可能な状態になってしまう。(Anyone can access the class)

・アクセサ方式

 

Good points

・safety=other pepole can not change the value

If you refer "getter", the situation become "Get only"

On the otherhand =if you set a setter , the situation" Write only"

アクセサ方式のメリット2:メンテナス性

・たまに_value が変な値になる

Public =public変数だと、値を設定しているすべての場所を変更しなければならない。

 

On the other hand=アクセサ方式

 

 

Session hijacking attack

 

From <https://www.owasp.org/index.php/Session_hijacking_attack>

 

On the site looks like very intered\sting for me , because

 

I'm talking about session hijacking attack .