java - How to convert BigDecimal to hex string? -


i have number of type bigdecimal, example 18446744073709551616, , want convert hexadecimal value.

is there way instead of doing manually?

judging example should rather use biginteger bigdecimal. try maybe way

new biginteger("18446744073709551616").tostring(16) 

or if cant change type of object convert biginteger before

new bigdecimal("18446744073709551616").tobiginteger().tostring(16); 

Comments

Popular posts from this blog

Receive udp packets in android gstreamer -

php - Extract Text from HTTP referer -

matplotlib - PYTHON: Annotate boxes disapear dependant on range -