We just create a reference of string class without making a object of it and start using it, how is it possible?
String s = "test";
String is a class, so to use it we should create an object of it. But rather we just make a reference of it and give it a value. How is it possible and what concepts are used in it.
The metadata o开发者_运维技巧f String class shows the following :
public sealed class String : IComparable, ICloneable, IConvertible,
IComparable<string>, IEnumerable<char>, IEnumerable, IEquatable<string> {...}
Kindly explain. Thanks in advance.
Please see following post at SO
Why string is a reference type, but behaves differently from other reference types?
精彩评论