【发布时间】:2014-03-10 06:36:31
【问题描述】:
我有一个带有字节值的 String[]
String[] s = {"110","101","100","11","10","1","0"};
遍历s,我想从中取出int值。
我正在使用这个
Byte b = new Byte(s[0]); // s[0] = 110
int result = b.intValue(); // b.intValue() is returning 110 instead of 6
据此,我试图得到结果,{6, 5, 4, 3, 2, 1}
我不知道从这里去哪里。我能做什么?
谢谢各位。问题已回答。
【问题讨论】: