kellen_1 2014-03-20 15:14 采纳率: 0%
浏览 3386

如何将整型转化为指定位数的二进制代码

public class B40 {
public static void main(String[] args) {
int n =25;
String str = Integer.toBinaryString(n);
System.out.print(str);
}

}
我想是输出的二进制字符串为十位

  • 写回答

2条回答 默认 最新

  • c920816698 2014-03-21 01:43
    关注

    参考一下做字符串拼接的思路

    评论

报告相同问题?