Java/C2/Using-this-keyword/Tamil

From Script | Spoken-Tutorial
Jump to: navigation, search
Time Narration
00:02 java ல் this keyword பயன்படுத்துதல் குறித்த Spoken Tutorial க்கு நல்வரவு.
00:07 இதில் கற்கபோவது
00:09 this keyword ன் பயன்
00:11 fields உடன் this keyword ஐ பயன்படுத்துதல்
00:14 constructors பிணைப்பிற்கு this keyword ஐ பயன்படுத்துதல்.
00:17 இங்கே நாம் பயன்படுத்துவது: Ubuntu version 11.10, jdk 1.6, Eclipse 3.7.0
00:28 இந்த tutorial ஐ தொடர
00:30 eclipse ஐ பயன்படுத்தி java ல் constructor உருவாக்க தெரிய வேண்டும்
00:34 இல்லையெனில் அதற்கான tutorial ஐ இந்த தளத்தில் காணவும், (http://www.spoken-tutorial.org)
00:40 இப்போது this key word ன் பயனைப் பார்ப்போம்
00:44 ஒரு constructorனுள், this... நடப்பு object க்கு reference ஆகும்.
00:48 this ஐ பயன்படுத்தி constructor னுள் நடப்பு Object ன் எந்த member யும் refer செய்யலாம்.
00:55 இப்போது fields உடன் this keyword ன் பயனைக் காண்போம்.
01:00 this keyword... பெயர் மோதல்களை தவிர்க்க உதவுகிறது.
01:07 அதுபோல ஒரு உதாரணத்தைக் காண்போம்.
01:10 அதற்கு Eclipse ஐ திறப்போம்.
01:17 முன் tutorial லில் உருவாக்கிய Student class ஐ திறப்போம்
01:23 default constructor ஐ Comment செய்க.
01:34 ஒரு parameter உடன் உள்ள constructor ஐ Comment செய்க.
01:40 முதல் இரு objects உருவாக்கத்திற்கான code ஐயும் comment செய்க.
02:03 இப்போது parameterized constructor ஐ கவனிக்க
02:11 the_roll_number மற்றும் the_name ஆகியவை constructor க்கு அனுப்பப்பட்ட argumentகள்.
02:20 roll_number மற்றும் name ஆகியவை instance variables.
02:26 இப்போது arguments... roll_number மற்றும் name என மாற்றுகிறேன்.
02:39 எனவே constructor னுள் இருப்பது:
02:42 roll_number equal to roll_number மற்றும்
02:49 name equal to name.
02:55 file ஐ சேமித்து இயக்குவோம். அழுத்துக Ctrl ,S பின் Ctrl, F11
03:04 வெளியீடு பின்வருமாறு:
03:07 I am a Parameterized Constructor 0 null
03:12 code க்கு மீண்டும் வருவோம்.
03:17 code ல் இரு எச்சரிக்கைகளைப் பார்க்கிறோம்.
03:20 எச்சரிக்கை குறிக்கு மேல் mouse ஐ நகர்த்துக.
03:23 காண்பது The assignment to the variable roll_number has no effect
03:29 மற்றும் The assignment to the variable name has no effect.
03:33 ஏனெனில் constructor ல் roll_number மற்றும் name என்பன local variables.
03:40 Local variables என்பவை method அல்லது blockனுள் அணுகக்கூடிய variables ஆகும்.
03:47 இங்கே, roll_number மற்றும் name என்பன 11 மற்றும் Raju க்கு initialize செய்யப்படும்.
03:54 ஏனெனில் மதிப்புகள் 11 மற்றும் Raju ஐ constructor க்கு அனுப்பியுள்ளோம்.
04:01 ஆனால் இவை constructor ஐ விட்டு வெளியே வந்தவுடன், அணுகக்கூடியதாக இருக்காது.
04:06 பின் roll_number மற்றும் name என்பவை instance variables என தெரியும்.
04:13 object உருவானவுடன் அவை 0 மற்றும் null க்கு ஏற்கனவே intialize செய்ய்ப்பட்டுள்ளன.
04:18 எனவே பெறும் வெளியீடு 0 மற்றும் null.
04:21 இப்போது constructorனுள் சிறு மாற்றத்தை ஏற்படுத்தலாம்.
04:29 எழுதுக this dot roll_number equal to roll_number.
04:37 this dot name equal to name.
04:44 file ஐ சேமித்து இயக்கவும். அழுத்துக ctrl, S பின் Ctrl, F11
04:51 பெறும் வெளியீடு
04:53 I am Parameterized Constructor 11 Raju
04:58 இது ஏனெனில் this dot roll_number மற்றும் this dot name என்பன instance variables ஆன roll_number மற்றும் name ஐ refer செய்கின்றன
05:12 இங்கே roll_number மற்றும் name ஆகியன method க்கு அனுப்பப்பட்ட arguments.
05:20 local மற்றும் instance variableகளுக்கு இடையே மோதல்களைத் தவிர்க்க this keyword ஐ பயன்படுத்துகிறோம்.
05:29 constructor இணைப்பிற்கான this keywords பயன்பாட்டைக் காண்போம்.
05:34 this keyword ஐ constructor னுள் மற்றொன்றை call செய்ய பயன்படுத்தலாம்.
05:39 அந்த constructors அதே class ல் இருக்க வேண்டும்
05:43 இது explicit constructor invocation எனப்படும்.
05:46 நாம் உருவாக்கிய Student class க்கு திரும்ப வருவோம்.
05:54 commentகளை நீக்குவோம்.
06:28 முதல் இரு constructorகளில் instance variableகளை அதன் மதிப்பிற்கு assign செய்யும் பகுதியை comment செய்வோம்
06:52 இரண்டு மற்றும் மூன்றாம் objectகளை உருவாக்கும் பகுதியை comment செய்வோம்
07:08 இப்போது parameters இல்லாத constructorக்கு வருவோம்.
07:16 curly bracketகளுக்கு பின் எழுதுக this bracketகளினுள் 11 semicolon.
07:28 இரண்டாம் constructorனுள் எழுதுக this bracketகளினுள் 11 comma இரட்டை மேற்கோள்களில் Raju semicolon.
07:42 file ஐ சேமித்து இயக்குவோம். அழுத்துக Ctrl,S மற்றும் Ctrl , F11.
07:49 நாம் பெறும் வெளியீடு
07:51 I am a Parameterized Constructor
07:54 I am a constructor with a single parameter
07:57 I am Default Constructor 11 Raju
08:02 இப்போது வெளியீட்டை விளக்குகிறேன்.
08:08 object உருவாக்கப்படும்போது அதற்கான constructor... call செய்யப்படுகிறது.
08:13 இங்கே constructor argument இல்லாத constructor.
08:20 control... constructor ல் முதல் வரிக்கு வருகிறது.
08:24 இது this within brackets 11 ஐ சந்திக்கிறது.
08:26 எனவே இது ஒரு integer argument ஐ ஏற்கும் constructor ஐ call செய்கிறது.
08:36 பின் control... this within brackets 11 comma Raju க்கு வருகிறது
08:44 எனவே இது ஒரு integer மற்றும் ஒரு String argument ஐ ஏற்கும் constructor ஐ call செய்கிறது.
08:53 எனவே இந்த constructor இயக்கப்பட்டு பெறும் வெளியீடு I am Parameterized Constructor.
09:02 நாம் அனுப்பப்பட்டதுபோல instance variables 11 மற்றும் Rajuக்கு initialize செய்யப்படுகிறது.
09:11 இப்போது, control... constructor call க்கு திரும்ப செல்கிறது.
09:16 இரண்டாம் constructor இயக்கப்படுகிறது.
09:19 பெறும் வெளியீடு I am constructor with a single parameter.
09:25 பின், control முதல் constructor க்கு சென்று அதை இயக்குகிறது.
09:30 அதற்கு பெறும் வெளியீடு I am a default constructor.
09:37 பின் studentDetail method இயக்கப்படுகிறது.
09:42 எனவே பெறுவது 11 மற்றும் Raju.
09:45 சிறு மாற்றத்தை செய்வோம்.
09:47 constructor ல் கடைசியாக this statement ஐ எழுதுவோம்.
10:01 compiler error பெறுகிறோம்.
10:03 பிழை குறிக்கு மேல் mouse ஐ நகர்த்துவோம்.
10:06 பெறும் பிழை: Constructor call must be the first statement in the constructor.
10:12 எனவே இதை constructor ன் முதல் வரியில் இட வேண்டும்
10:16 இதை constructor ன் முதல் வரியில் இடுவோம்
10:27 இப்போது பிழை மறைந்ததைக் காணலாம்
10:31 இந்த tutorial ல் நாம் கற்றது
10:35 fieldsஉடன் this keyword பயன்படுத்த
10:38 constructors பிணைப்பிற்கு this keyword ஐ பயன்படுத்த
10:41 constructorனுள் this keyword ஐ எவ்வாறு பயன்படுத்த வேண்டும்
10:45 சுய பரிசோதனைக்கு, முன்னர் உருவாக்கிய Employee class ல்:
10:49 இரு parameterகளுடன் constructor உருவாக்குக
10:52 instance variables ஐ initialize செய்ய this keyword ஐ பயன்படுத்துக
10:57 parameter இல்லாமலும் ஒரு parameterஉடனும் constructor உருவாக்குக
11:01 tutorial ல் சொன்னது போல this ஐ பயன்படுத்தி constructorகளை இணைக்க முயற்சிக்கவும்.
11:07 இந்த இணைப்பில் உள்ள காணொளியைக் காணவும்
11:12 இது spoken tutorial திட்டத்தை சுருக்க சொல்கிறது
11:16 இணைய இணைப்பு வேகமாக இல்லையெனில் தரவிறக்கி காணவும்.
11:19 Spoken Tutorial திட்டக்குழு spoken tutorial களை பயன்படுத்தி செய்முறை வகுப்புகள் நடத்துகிறது
11:26 இணையவழி தேர்வில் தேர்பவர்களுக்கு சான்றிதழ்களும் வழங்குகிறது
11:30 மேலும் விவரங்களுக்கு மின்னஞ்சல் செய்யவும் contact@spoken-tutorial.org
11:36 ஸ்போகன் டுடோரியல் பாடங்கள் டாக் டு எ டீச்சர் திட்டத்தின் முனைப்பாகும். இதற்கு ஆதரவு இந்திய அரசு துவக்கிய MHRD இன் ஐசிடி மூலம் தேசிய கல்வித்திட்டத்தின் வழியே கிடைக்கிறது.
11:46 மேலும் விவரங்களுக்கு http://spoken-tutorial.org/NMEICT-Intro
11:55 இத்துடன் இந்த tutorial முடிகிறது.
11:58 தமிழாக்கம் பிரியா. நன்றி

Contributors and Content Editors

Pratik kamble, Priyacst