Converting back from toString to Object

前端 未结 7 1709
谎友^
谎友^ 2020-12-11 21:23

Is there any way to convert from toString back to the object in Java?

For example:

Map myMap = new HashMap

        
7条回答
  •  伪装坚强ぢ
    2020-12-11 22:02

    No there isn't.

    toString() is only intended for logging and debug purposes. It is not intended for serialising the stat of an Object.

提交回复
热议问题