Yeah you can do it as well but it will be an assignment and even after changing the value of width height volume will be the same that was calculated and assigned initially. But in case of getter it will calculate the volume everytime you will access the volume. So you will get correct volume even after changing width height.
If i have a function in data class witch return a private const BASE_IMAGE_URL ="https:/..." data class Product( val imageUrl :String ) { fun fullImageUrl() =BASE_IMAGE_URL + imageUrl } can i change it with getter Like get =BASE_IMAGE_URL+ imageUrl And sir last think do u have video about authenticator (okhttp) And thank u so much
Thank you for taking the Time in making such an amazing video series. You explain and teach well. Many thanks Shukriyah
Amazing video! Thank you so much 😃 You really explain the details 👍🏻
Thank you for this video! I've been trying to understand these for a very long time but nobody really focuses on the keywords like you did
I want my class's attribute to be iterable..
Right now the default implementation
by kotlin is a flat assignment how do I do that
Why we need to initialize the var explicitly while using get method?
can we use
val volume = length * width * height
Instead of
val volume
get() = length.....
????
Yeah you can do it as well but it will be an assignment and even after changing the value of width height volume will be the same that was calculated and assigned initially.
But in case of getter it will calculate the volume everytime you will access the volume. So you will get correct volume even after changing width height.
@@SimplifiedCoding thanks, you are great teacher.
thank you for sharing your knowledge
very good video
If i have a function in data class witch return a
private const BASE_IMAGE_URL ="https:/..."
data class Product(
val imageUrl :String
)
{
fun fullImageUrl() =BASE_IMAGE_URL + imageUrl
}
can i change it with getter
Like
get =BASE_IMAGE_URL+ imageUrl
And sir last think do u have video about authenticator (okhttp)
And thank u so much
Yes you can do it ofcourse.
Not yet but I will make a video about authenticator soon.
@@SimplifiedCoding thank u 🧡
I want to learn android but how to start?
I have basic knowledge about it
So please guide me android or kotlin?
Kotlin ofcourse
@@SimplifiedCoding kotlin basics available in ur playlist?
Yes, this video is itself the part of basics playlist.
Ok thank u.
If any query i will msg u
why is that property is public? no need setter and getter
Setter and getter implementation seems to be the same as property, don't know how good it will be for incapsulation...
👏🏻👏🏻 nice video
THX A LOT !!
Sir please make a e-commerce app with make api plz sir
Super
watching a speed 1.75