Java Program to convert decimal to binary

The toBinaryString() method is used in Java to convert decimal to binary. The syntax is as follows:

Here, dc is the decimal value you want to convert.

Note: The toBinaryString() converts and returns binary in base 2.


Following is an example to convert decimal to binary:


Java Program to convert string to integer
Java Program to check for Integer Overflow
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading