Java recreate string from hashcode

前端 未结 5 1665
眼角桃花
眼角桃花 2020-12-10 15:45

Is there any way that I can use a hashcode of a string in java, and recreate that string?

e.g. something like this:

String myNewstring = StringUtils.         


        
5条回答
  •  情书的邮戳
    2020-12-10 16:23

    No. Multiple Strings can have the same hash code. In theory you could create all the Strings that have have that hash code, but it would be near infinite.

提交回复
热议问题