Java Program to Convert Binary to Decimal

Problem Description Write a Java program that takes a binary number as input and convert it to a decimal number. Binary Number System: The binary number system also known as base 2 number system was invented in 1689 by Gottfried Leibniz it contains two symbol 0 and 1. The base 2 number system is a … Read more

advertisement

Java Program to Convert Octal to Decimal

Problem Description Write a Java program to Convert Octal to Decimal. Octal Number: In Java, an octal number is a numeric value represented in base-8, using digits from 0 to 7 that is 0, 1, 2, 3, 4, 5, 6, 7. It is denoted by a leading 0 followed by octal digits. Octal numbers can … Read more

advertisement

Java Program to Convert Hexadecimal to Binary

This is a Java Program to Convert Hexadecimal to Binary. We make a class with two methods one for input and other for conversion and access this by object of this class. We first take the input as HexaDecimal from user. We define a method as convert() to convert the user’s input to Binary. Here … Read more

advertisement

Java Program to Convert Octal to Binary

This is a Java Program to Convert Octal to Binary. We make a class with two methods one for input and other for conversion and access this by object of this class. We first take the input as Octal from user. We define a method as convert() to convert the user’s input to Binary. Here … Read more

advertisement

Java Program to Convert Binary to Hexadecimal

This is a Java Program to Convert Binary to Hexadecimal. We make a class with two methods one for input and other for conversion and access this by object of this class. We first take the input as Binary from user. We define a method as convert() to convert the user’s input to HexaDecimal. Here … Read more

advertisement

Java Program to Convert Binary to Octal

This is a Java Program to Convert Binary to Octal. We make a class with two methods one for input and other for conversion and access this by object of this class. We first take the input as Binary from user. We define a method as convert() to convert the user’s input to Octal. Here … Read more

advertisement

Java Program to Convert Decimal to Binary, Octal and Hexadecimal

This is a Java Program to Convert Decimal to Binary, Octal and Hexadecimal Number. Here we take input as Decimal number and convert this entered number to HexaDecimal, Octal and Binary using methods toHexString(), toOctalString() and toBinaryString() respectively. Here is the source code of the Java Program to Convert Decimal to Binary, Octal and Hexadecimal … Read more

advertisement

Hexadecimal to Decimal in Java

Problem Description Write a Java program to Convert Hexadecimal to Decimal Decimal Number System: The decimal number system is one of the most popular number system used in day to day life. It is also known as base 10 number system as it uses digits from 0 to 9 that is 0, 1, 2, 3, … Read more

advertisement

Java Program to Convert Fahrenheit to Celsius

This is a Java Program to Convert Fahrenheit into Celsius. formula: temperature in celsius = (temperature in fahrenheit – 32)*(0.5556) Enter the temperature in Fahrenheit and now using the mentioned formula we get the desired output. Here is the source code of the Java Program to Convert Fahrenheit into Celsius. The Java program is successfully … Read more

advertisement

Java Program to Convert Decimal to Binary using Recursion

This is a Java Program to Convert a Number Decimal System to Binary System using Recursion. Enter any number as an input. Now we make a new method named binary with return type string that gives us the desired result with the help of modulus operation. Here is the source code of the Java Program … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.