Possible Duplicate:
Java string replace and the NUL (NULL, ASCII 0) character?
I'm doing some String algorithms in Java, and i noticed that wherever i include a char with the value of 0 (zero) it marks the end of the String. Like this:
String aString = "I'm a String";
char[] aStringArray = aString.toCharArray();
aStringArray[1] = 0;
System.out.println(new String(aStringArray)); //It outputs "I"
What's the reason/cause of this behaviour?