Java Decimal to Binary decimalToBinaryString(int n)

Here you can find the source of decimalToBinaryString(int n)

Description

decimal To Binary String

License

Apache License

Declaration


public static String decimalToBinaryString(int n) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String decimalToBinaryString(int n) {
        return Integer.toBinaryString(n);
    }//from  w ww.  j  a  v  a 2  s.c o  m

    public static String decimalToBinaryString(long n) {
        return Long.toBinaryString(n);
    }
}

Related

  1. dec2bin(int dec)
  2. dec2bin(Integer str)
  3. decimalToBitString(int n, int min, int max)