Kotlin 'LAZY' delegation. LateInit vs Lazy. Kotlin Tutorials for Beginners #12.3

  Рет қаралды 39,599

Smartherd

Smartherd

Күн бұрын

Пікірлер: 33
@pomsubho
@pomsubho 4 жыл бұрын
You know I check several medium posts by I was unable to understand. After I saw the 4 min of video I just get the point. It is really great.
@UnderDogStudioz799
@UnderDogStudioz799 Жыл бұрын
The last summary is always helpful , It helps me to create the short notes of the concept 🥰
@fursatmaigungunaya8248
@fursatmaigungunaya8248 2 жыл бұрын
How to use lazy with var please do let us know as we didn't find regarding this any doc?
@sharifullahOfficial02
@sharifullahOfficial02 6 ай бұрын
proud on you sir, i like you from Pakistan
@sagarock1012
@sagarock1012 4 жыл бұрын
Simple and clean explanation to the point
@FunnyFlicks121
@FunnyFlicks121 4 жыл бұрын
Best course ever awesome experience love from Pakistan
@brucebane7401
@brucebane7401 4 жыл бұрын
amazing !!!!love from detroit
@al-aminislam1493
@al-aminislam1493 2 жыл бұрын
Very clear explanation
@smartherd
@smartherd 2 жыл бұрын
Glad you liked it
@androidpc9656
@androidpc9656 2 жыл бұрын
@@smartherd How to use lazy with var
@MelErtekin
@MelErtekin Жыл бұрын
The video was good at the beginning, but I got confused at the end. Is't lazy only for non-nullable val variables?
@footballCartoon91
@footballCartoon91 2 жыл бұрын
i have several questions.. 1) when does the memory for lazy object/data will get destroyed? is it the same concept with static keyword in C++ ? or like companion object (because many forums seems to suggest companion object is actually a static data 2) if the lazy data can be null why is that you want to even use that data? 3) if the lazy data is a var , what will happen if multiple objects are using it like assignment of new values. Will the last assignment overwrites previous assignment? which makes me think of like a global variable in C++ and a little bit like a class in the context of memory usage (i.e memory is not allocated until you instantiate it) 3) if number three is correct, should i handle null explicitly?. if for example the last assignment is null.
@flamingburger949
@flamingburger949 2 жыл бұрын
you're amazing
@sohailpathan1436
@sohailpathan1436 5 жыл бұрын
Great Explanation
@ranganafernando511
@ranganafernando511 5 жыл бұрын
Great video
@pradeep9222
@pradeep9222 3 жыл бұрын
thank you so much it's helpful
@UpLiftingU007
@UpLiftingU007 2 жыл бұрын
Can you make an video on 'LazyThreadSafteyMode' types , which type to use ,during initialisation of lazy{}
@AkashJhaDDN
@AkashJhaDDN 5 жыл бұрын
Is it available in var also
@himanshutariyal7648
@himanshutariyal7648 5 жыл бұрын
Are there any commands for the input by t he user ? I was not able to find them in the whole module
@yktoledo
@yktoledo 4 жыл бұрын
One question: would have sense in the case of viewbinding? mean if I have private lateinit var xmlFileNameBinding: XmlFileNameBinding private val textFieldVar by lazy { xmlFileNameBinding.textFieldId } or when viewbinding comes into play no lazy initialization needed?
@SaturnStarOfDavid
@SaturnStarOfDavid 2 жыл бұрын
No it doesnt make any sense. Non what so ever. Ctl-A Delete.
@sudhanshusharma9159
@sudhanshusharma9159 5 жыл бұрын
here is error Operator call corresponds to a dot-qualified call 'pi.times(4)' which is not allowed on a nullable receiver 'pi'. below i code. val pi : Float ? by lazy { 3.14f } fun main() { println("test lazy initialization") val area = pi *4 * 4 // error here //println(pi) }
@ajaykeshri971
@ajaykeshri971 5 жыл бұрын
super tutorial
@sreenivasangk4347
@sreenivasangk4347 5 жыл бұрын
Lazy is not a keyword. It is lamda function.
@maansoftwares3813
@maansoftwares3813 6 жыл бұрын
sorry but i think lazy are only for val because lazy blog cant run second time so no use of var
@veeralavan2372
@veeralavan2372 5 жыл бұрын
@Maan, if any other initializer available for var (l.e lazy initializer)
@vedantjha2327
@vedantjha2327 Жыл бұрын
Yes lazy can be applied to val
@dennisgonzales9521
@dennisgonzales9521 4 жыл бұрын
Awesome
@personalchaoyu8732
@personalchaoyu8732 5 жыл бұрын
thanks.
@divyeshganvit4599
@divyeshganvit4599 6 жыл бұрын
Hi sir i like your videos how many more videos come future about kotlin. ?
@smartherd
@smartherd 6 жыл бұрын
It's going to end
@fangzsx0409
@fangzsx0409 4 жыл бұрын
I am here 2020
@ArjunVerma-lq4cf
@ArjunVerma-lq4cf 3 жыл бұрын
sxy bs aap hindi mai aur krlo to mauj ajaye
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Learn Kotlin in 12 Minutes
12:01
Rahul Pandey
Рет қаралды 346 М.
Kotlin lazy delegate - explanation and example
7:58
Rahul Pandey
Рет қаралды 12 М.
lateinit vs lazy in Kotlin | Amit Shekhar | @OutcomeSchool
8:17
Amit Shekhar
Рет қаралды 10 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 172 М.
Kotlin For Beginners - Reified
7:28
Charfaoui Younes
Рет қаралды 2,8 М.
Learn GO Fast: Full Tutorial
1:07:53
Alex Mux
Рет қаралды 523 М.