I have a doubt from a long time and couldnt find the answer.......We use access modifiers to control the accessiblity within the program to ensure encapsulation.....so if we have a private variable and if still we can access it through a public getter method then what is the use of having a private variable.....it can be public instead right?
Bro if you are not using getter, you can actually change that element value from the calling class. It should not happen. Original element should be always private to that class. Also in some cases you make some operations on the values before returning in getter.
Nice example sir really liking the explanation quite simple down level
Encapsulation is very interesting concept sir❤
I have a doubt from a long time and couldnt find the answer.......We use access modifiers to control the accessiblity within the program to ensure encapsulation.....so if we have a private variable and if still we can access it through a public getter method then what is the use of having a private variable.....it can be public instead right?
same doubt i also have
Bro if you are not using getter, you can actually change that element value from the calling class. It should not happen. Original element should be always private to that class.
Also in some cases you make some operations on the values before returning in getter.
Good explanation sir
Please apk la smali code full course learn video podunga
👏👏👏