I am stumped on this and I need some fresh eyes, I'm not sure why this code is doing this.
String string = new String(new char[] {(char) 0x01, (char) 0x02, ... ,(char) 0xFC});
The output is everything it should be up until the last number (the 0xFC) it returns a -4,
I know its a hex value, but if I do the same with 252 the decimal value, it gives me a negative as well. I hope this is just a simple solution, and I just can't see it.
Thanks ahead of time.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…