java 字符串结尾 和 C字符串结尾的区别
java 字符串不以'\0'结尾,比如 byte [] szbuf = new byte[10],系统默认szbuf[0] = szbuf[1] = szbuf[2]...szbuf[9] = 0,此时如果 String temp = new String(szbuf) , temp.length() = 10,而c或者c++不同, 如果 char [] szbuf1 = new char[1...
原创
2018-02-24 21:25:00 ·
3090 阅读 ·
0 评论