toBinaryString() Method in java
Java Programming Language Number Class in java (Article) Number Class in java (Program)
1061Program:
public class IntegertoBinaryStringMethod { public static void main(String[] args) { System.out.println(Integer.toBinaryString(10)); System.out.println(Integer.toBinaryString(-10)); System.out.println(Integer.toBinaryString(10000)); System.out.println(Integer.toBinaryString(-10000)); } }
Output:
1010 11111111111111111111111111110110 10011100010000 11111111111111111101100011110000 Press any key to continue . . .
This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.