Use of ME Keyword


 Step1. Create a proram in Tx- SE38.

Step2. Execute the program and we find the below output.

Step3. Now declare a local variable within the method with the same name as the class variable & execute it.

Step4. So if the class and method contains the variable with the same name then priority is given to the local one.

Step5. To access the class variable in the method which already contains a local variable with the same name ME keyword is used which always points to the Current calling Object of the class. Execute the program.

Step6. The O/P is as follows:


 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s