class Ideone
{
{
String unumber
= "U+" + Integer.
toHexString(emoji
).
toUpperCase(); System.
out.
println(s
+ " is code point " + unumber
); System.
out.
println("Code point " + unumber
+ " converted back to string: " + s2
); System.
out.
println("Successful round-trip? " + s.
equals(s2
)); }
}
Y2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewogICAgICAgIFN0cmluZyBzID0gIvCfmIIiOwogICAgICAgIGludCBlbW9qaSA9IENoYXJhY3Rlci5jb2RlUG9pbnRBdChzLCAwKTsKICAgICAgICBTdHJpbmcgdW51bWJlciA9ICJVKyIgKyBJbnRlZ2VyLnRvSGV4U3RyaW5nKGVtb2ppKS50b1VwcGVyQ2FzZSgpOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihzICsgIiAgaXMgY29kZSBwb2ludCAiICsgdW51bWJlcik7CiAgICAgICAgU3RyaW5nIHMyID0gbmV3IFN0cmluZyhuZXcgaW50W10geyBlbW9qaSB9LCAwLCAxKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkNvZGUgcG9pbnQgIiArIHVudW1iZXIgKyAiIGNvbnZlcnRlZCBiYWNrIHRvIHN0cmluZzogIiArIHMyKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIlN1Y2Nlc3NmdWwgcm91bmQtdHJpcD8gIiArIHMuZXF1YWxzKHMyKSk7Cgl9Cn0=