小编Dav*_*vid的帖子

\ x在Java中逃脱?

我想知道在Java中是否存在类似的十六进制(\ x)转义,就像在C++中一样.例如:

char helloworld[] = "\x48\x45\x4C\x4C\x4F\x20\x57\x47\x52\x4C\x44";
printf("%s", helloworld);
Run Code Online (Sandbox Code Playgroud)

到目前为止,Java中没有十六进制(\ x)转义.有没有一个替代方案,同样容易使用,而不必将一堆十六进制数字连在一起?

java hex escaping

41
推荐指数
2
解决办法
3万
查看次数

标签 统计

escaping ×1

hex ×1

java ×1