marphy-avatar

What is the difference between a String object and and array of char values?

"Hi! Please help me I am stuck with this. Please describe about a String object and and array of char values?"
over 13 years ago
0%

8 replies

over 13 years ago
aeinstein-avatar
"A personality variety is really a number of figures. The particular selection carries a fixed size. A new stringed it's essentially a directory of characters. The shape is much more variable. Character raiment: [0] - H [i] - Elizabeth [ii] - 50 [several] - L [four] - A Bowed stringed instrument: ""Hullo"" Supplier(azines): The subsequent could possibly be useful should you be acquainted with C#. string X = ""Hi""; charr[] Xarr = A.ToCharArray(); System.WriteLine(By); foreach(charwoman h in Xarr) Console.WriteLine(c); "
over 13 years ago
jesus33-avatar
"In Java, strings are objects of the String class and are immutable. In C++ there are 2 types: 1) old style C-strings which are char arrays with a special terminating char \0 in the last postion or 2) objects of the class"