Programmatically change variable from public to private
Is it possible for me to programmatically change a variable from public to private within a function call of 开发者_StackOverflow社区a class?
No it is not possible to change a variable from public to private.
Use access modifiers (setters, getters)and set private property to a public property.
You cannot change visibility of property.
精彩评论