Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Java how do you convert a base 36 number to a decimal number?

Tags:

java

math

decimal

Given the base 36 number YPAYPA, is there a library function in Java that would convert this to a decimal number?

like image 264
LotusFlower Avatar asked Dec 09 '25 01:12

LotusFlower


1 Answers

The below returns a String representation, in decimal, of the number.

Long.valueOf("YPAYPA", 36).toString();

From the J2SE docs

like image 141
ptomli Avatar answered Dec 10 '25 15:12

ptomli



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!