开发者

is it possible to fetch the data from the class created for getter-setter methods

开发者 https://www.devze.com 2023-04-02 04:33 出处:网络
In My Application i stored the data in to the One class said name as abc. in this class there are only getter setter methods available. I am going to store the String array in to that class by getter

In My Application i stored the data in to the One class said name as abc. in this class there are only getter setter methods available. I am going to store the String array in to that class by getter setter method. So it is Possible that from other activity to fetch all available values that are inserted i开发者_如何学运维n to that class ?? If yes then let me know. And if no then how it is possible ?


Yes we can do this.Make those functions public and you can use them using object of the corresponding class.Also you can make them static(but not recommended) and use them using class name itself.They are made for this purpose only.


yes, we can do you can store values in one activity and access in another activity.

Refer this How can I access stored values of a Bean from inside another Class

0

精彩评论

暂无评论...
验证码 换一张
取 消