+ 11
â String is not a primitive data type like int, char etc . Its a Class in java lang package (& class name starts with capital by naming convention in java to make code more readable).
//see this : intializing of a String , like a String object :
String hy = new String("hello");
+ 6
In java, string is not actual data type.
It is reference data type of a class.
Maybe that's why first letter of String is always capital.
Not sure tho.
+ 5
"Unlike C/C++, where string is simply an array of char, A Java String is an object of the class java.lang."
http://www.ntu.edu.sg/home/ehchua/programming/java/j3d_string.html
+ 5
Its because Strings are special they are objects.
And becuase of this you can access its properties like str.length which will return the length of your String, you cant do this with primitive types.