Comment on Tutorial - this keyword in Java By Jagan
Comment Added by : Al Scherer
Comment Added at : 2009-09-15 09:33:24
Comment on Tutorial : this keyword in Java By Jagan
I'm sorry but your closing statement...
"this is of no significant value in the examples just shown..."
... is not quite right. "this" is mandatory in your last code snippet (at least with Sun's Java 6). If you leave out the "this" references, you are actually assigning the constructor parameter values to the constructor's local variables - not to the instance variables.
And, to follow best practices, we'd make the arguments final so that, if we forgot the this's, the compiler would call it out for you.
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews
Subscribe to Tutorials
1. Fantastic Post, can u pls tell me how can i pass q
View Tutorial By: Kunal at 2012-08-07 07:02:41
2. I need one help how to update particular column da
View Tutorial By: santhosh.s at 2015-01-22 15:09:33
4. After a great struggle I am able to successfully c
View Tutorial By: raghu at 2012-01-04 15:10:07
5. Simple and to the point. Thanks for this tutorial.
View Tutorial By: Balvinder at 2008-08-03 04:40:05
6. please let me know the complete refernce with samp
View Tutorial By: NARI at 2009-04-11 23:50:03
7. how do i use the jsapi classes and the freets pack
View Tutorial By: Chileshe at 2012-08-22 14:23:38
8. Whne i run this code ,it does not return any ports
View Tutorial By: amit at 2009-06-10 02:11:13
10. hai, i tried the abvoe code, m getting the follwin
View Tutorial By: anith at 2011-03-13 06:02:31