Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

binary to octal conversion java program

// conversion of binary to octal in java..
public class Main{
    public static void main(String args[]) throws Exception{
        String binary = "1100100";                // binary number.. 
        int decimal = Integer.parseInt(binary,2); // converting binary to decimal
        System.out.println(Integer.toOctalString(decimal)); // 144 <= octal output..  
    }
}
Comment

PREVIOUS NEXT
Code Example
Java :: is java compiled or interpreted 
Java :: import java.lang.Math.*; 
Java :: checkc if string is double java 
Java :: java rename file 
Java :: java intent extras 
Java :: rainbow six 
Java :: set text from strings.xml 
Java :: current time stamp android java 
Java :: sort a list with custom comparator java 
Java :: Area of a Circle in Java Programming 
Java :: spring-boot java header appliacation/json constant 
Java :: java vs python 
Java :: hashmap get value by key java 
Java :: Java ArrayList Class of Collections 
Java :: list of string to string array in java 
Java :: android studio copy file 
Java :: import javafx 
Java :: hide app after install android studio 
Java :: java get size of array 
Java :: java stringbuilder set value 
Java :: unchecked exception in java 
Java :: launch java batch 
Java :: setter getter array java 
Java :: abstract method declaration 
Java :: what is outer class in java 
Java :: app "restart" the home activity (and dismiss all other activities). 
Java :: lcm of two large positive integers java 
Java :: nqueen problem with python 
Java :: exceptions in java 
Java :: stack initialization for string java 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =