Online Java Compiler By
JavaTpoint.com
public class IntegerToBinaryStringExample3 { public static void main(String[] args) { System.out.println(Integer.toBinaryString(20)); System.out.println(Integer.toBinaryString(-20)); System.out.println(Integer.toBinaryString(1000)); System.out.println(Integer.toBinaryString(-1000)); } }
Output