public class DataUtil { public static void main(String[] args) { int a = 8; int value = charToInt(byteToChar(intToByte(a))); int value2 = byteToInt(charToByte(intTochar(a))); System.out.println(value); System.out.println(value2); } public static byte…
var c: Char; b: Byte; begin c := 'A'; ShowMessage(c); //A b := ; ShowMessage(IntToStr(b)); c := Chr(); ShowMessage(c); //B b := Ord('B'); ShowMessage(IntToStr(b)); end; Char 如果对应的是AnsiChar(<=2007),就是ASCII码走,如果是WideChar(>2007),就是按Unicode编码顺序走…
java.lang.Boolean public static int hashCode(boolean value) { return value ? 1231 : 1237; } JDK 1.8新增一个hashCode方法,true的hashCode为1231,false的hashCode为1237, why? https://stackoverflow.com/questions/3912303/boolean-hashcode public static int compare(bool…