Write a menu driven program in java to convert decimal number to binary and binary number to
decimal based on user choice.
Share
Write a menu driven program in java to convert decimal number to binary and binary number to
decimal based on user choice.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Verified answer
Java program to convert decimal to binary
There are three following ways to convert Decimal number to binary number:
1) Using toBinaryString() method of Integer class.
2)Do conversion by writing your own logic without using any predefined methods.
3)Using Stack.