Telegram Group & Telegram Channel
14. Program to Convert Binary to Octal.

import java.io.*;

class BinaryToOctal
{
public static void main(String[] args) throws Exception
{
String num = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter binary number : ");
num = br.readLine();
int dec = Integer.parseInt(num, 2);

String oct = Integer.toOctalString(dec);

System.out.println("Binary " + num + " in Octal is " + oct);

}
}

@java_codings



tg-me.com/java_codings/23
Create:
Last Update:

14. Program to Convert Binary to Octal.

import java.io.*;

class BinaryToOctal
{
public static void main(String[] args) throws Exception
{
String num = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter binary number : ");
num = br.readLine();
int dec = Integer.parseInt(num, 2);

String oct = Integer.toOctalString(dec);

System.out.println("Binary " + num + " in Octal is " + oct);

}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/23

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

A Telegram spokesman declined to comment on the bond issue or the amount of the debt the company has due. The spokesman said Telegram’s equipment and bandwidth costs are growing because it has consistently posted more than 40% year-to-year growth in users.

If riding a bucking bronco is your idea of fun, you’re going to love what the stock market has in store. Consider this past week’s ride a preview.The week’s action didn’t look like much, if you didn’t know better. The Dow Jones Industrial Average rose 213.12 points or 0.6%, while the S&P 500 advanced 0.5%, and the Nasdaq Composite ended little changed.

Advance Java ‍ from it


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM USA