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

authentication - Mongodb revoke acccess to connect test database -

c - getting error: cannot take the address of an rvalue of type 'int' -

How to merge four videos on one screen with ffmpeg -