1 00:00:01,440 --> 00:00:06,740 Heidi's rings in the heart once again in the previous videos we have covered almost all their topics 2 00:00:06,920 --> 00:00:09,490 related to lambdas and high level functions. 3 00:00:09,530 --> 00:00:11,250 So please check those out. 4 00:00:11,390 --> 00:00:17,060 Now in this video we're going to check out the concept of Witan a play that is present in the Codlin 5 00:00:17,270 --> 00:00:21,990 standard library so we're inside the intelligent ID. 6 00:00:22,040 --> 00:00:29,070 I have a class of person with the property of name and each having some defined value. 7 00:00:29,120 --> 00:00:36,750 Now down the side and having a method of start Tren So inside the main method I have simply created 8 00:00:36,750 --> 00:00:41,560 the object of person given its own values and and ease as 23. 9 00:00:41,730 --> 00:00:43,790 And simply printing out the values. 10 00:00:43,800 --> 00:00:47,520 Now this is a normal way of initializing the objects right. 11 00:00:48,820 --> 00:00:55,090 But if you notice here we are simply repeating the person dork name person our age again and again but 12 00:00:55,300 --> 00:00:57,460 this is Cartland not Java. 13 00:00:57,460 --> 00:00:59,670 We can make our code more cleaner. 14 00:00:59,800 --> 00:01:06,520 So here again we can simply use lambdas to make our code look more cleaner and also reduce the redundancy 15 00:01:06,520 --> 00:01:07,560 of the code. 16 00:01:07,570 --> 00:01:15,130 So here I would simply use that keyword and as a parameter simply pass person object. 17 00:01:15,130 --> 00:01:17,720 Now then I would simply define the lambda. 18 00:01:17,800 --> 00:01:18,860 But I digress. 19 00:01:18,860 --> 00:01:19,570 Gurly blaggard. 20 00:01:19,570 --> 00:01:21,290 Open and close now. 21 00:01:21,340 --> 00:01:25,370 Inside the lambda I will simply guard these two lines of code. 22 00:01:26,550 --> 00:01:28,270 And pasted inside of it. 23 00:01:28,290 --> 00:01:29,200 Statement. 24 00:01:29,370 --> 00:01:34,500 But here we do not have to repeat the person object again and again. 25 00:01:34,740 --> 00:01:38,820 They can simply use name equal to a string and equal to three. 26 00:01:38,820 --> 00:01:44,420 Now if it in the code right now I will simply name a string and age as string theory. 27 00:01:44,430 --> 00:01:52,020 So this keyword is actually the part of Cartland standard library nor Nordell Cartland language right 28 00:01:52,620 --> 00:01:53,140 now. 29 00:01:53,250 --> 00:02:00,180 Apart from that we also have the app like Word which is again the part of the Cartland standard library 30 00:02:00,440 --> 00:02:02,340 not to use the app like word. 31 00:02:02,370 --> 00:02:08,000 We have to use person Dorte apply and insert this. 32 00:02:08,010 --> 00:02:10,970 Again we have to define our lambda right. 33 00:02:11,010 --> 00:02:15,610 So here I will simply copy the code from here pasted here. 34 00:02:15,870 --> 00:02:21,060 If you want you can get some different values and then if you run the code then this school will act 35 00:02:21,300 --> 00:02:27,750 similar to discord but in case of a reply it actually returns a receiver not the receiver. 36 00:02:27,750 --> 00:02:35,350 In our case is person and apart from this this play key word has the right to call these matters such 37 00:02:35,350 --> 00:02:39,320 as start to then present inside the class of person. 38 00:02:39,430 --> 00:02:43,110 So here if you want you can also use Daut keyword. 39 00:02:43,120 --> 00:02:44,500 Then start Tren. 40 00:02:44,650 --> 00:02:51,270 So after initializing the name estrogen and progesterone D-3 we can simply call this method of starter 41 00:02:51,630 --> 00:02:55,100 Daryl simply execute this method and simply put in. 42 00:02:55,100 --> 00:03:00,350 Now I am ready to run because all the values has already got initialized. 43 00:03:00,400 --> 00:03:08,500 That is name as string and E-string it's free right but in case of Wicki word you cannot call the start 44 00:03:08,580 --> 00:03:09,720 or end method. 45 00:03:09,730 --> 00:03:12,980 It will show some error and or reference. 46 00:03:13,060 --> 00:03:16,130 So this is the difference between the vid and like you were. 47 00:03:16,300 --> 00:03:23,430 And again remember these two are again very important in terms of Android application development. 48 00:03:23,480 --> 00:03:30,000 Now at last I would like to tell you that whatever chords that you saw in case of Landau's and high 49 00:03:30,010 --> 00:03:37,100 level functions are just the basics and fundamentals the practical usage of Londres and high level functions 50 00:03:37,270 --> 00:03:42,530 will check out in our upcoming more deals then we will talk about the collections in detail. 51 00:03:42,890 --> 00:03:46,730 So as of now this much information is enough for this more detail. 52 00:03:46,940 --> 00:03:48,820 Thanks for watching and have a good day. 53 00:03:48,840 --> 00:03:50,340 This is showing are signing off. 54 00:03:50,360 --> 00:03:50,930 Thank you.