【发布时间】:2015-11-09 11:54:13
【问题描述】:
我的想法是这样的:
public static void main(String[] args) {
int i;
String s = "0b00110001";
i = Integer.decode(s);
System.out.print(s);
}
【问题讨论】:
-
你有
Integer.parseInt()做这样的事情 -
@VinodMadyalkar 如果没有字符串操作将无法工作
-
@VinodMadyalkar 你错了。
-
@Alexander - 请详细说明问题:)
-
@Alexander -我在那里看到了“b”,如果你有自己的数字编码方式,你将不得不编写自己的代码来解码它们。你在期待什么?。输出应该是什么?