将整形的数字转成为二进制

package bailaoVJ;

import java.util.Scanner;

public class code17 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
String s = Integer.toBinaryString(n);
System.out.println(s);
}
}

Integer.toBinaryString(n);