Cany anyone tell Why String is not a primitive data type?
Thanks
Srik
Printable View
Cany anyone tell Why String is not a primitive data type?
Thanks
Srik
A primitive type is predefined by the language and is named by a reserved keyword. Primitive values do not share state with other primitive values.In Java, a string of characters is NOT considered a primitive data type but a complex data type implemented as a Java class.
String is not a primitive data type as string has been derived from Char which takes more number of Char and integers..providing the more memory storage hence strings are objects of class String.