Java Numbers

Decimal to Hexadecimal

Decimal to Hexadecimal Conversion: Examples and Java Code

To convert decimal to hexadecimal, divide by 16 repeatedly and read the remainders in reverse, so 269 becomes 10D. See a worked division table, a table of common conversion examples, and the Java one-liners for both directions.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.