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 -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -