+ 3

Why the type string is declared as 'String' not 'string'?

Why string type declaration not starts with small letter like int,char,float?

3rd Sep 2016, 4:24 PM
Gayathridevi.S
9 Réponses
+ 8
String is a class in java..al classes wil be startng wit capital letter.
3rd Sep 2016, 6:28 PM
abi
+ 8
int ,bool,double etc. are primitive type in Java but String is a object.And object names start with Capital letter.
3rd Sep 2016, 8:43 PM
bayram akdemir
bayram akdemir - avatar
+ 1
Bcz String is a class and in Java class is star with capital letter so we use it String not as string
25th Jan 2017, 2:18 PM
Pansare Shyam
+ 1
in java class name first letter should be capital and String is class
3rd Feb 2017, 9:07 PM
Anand Bachhav
0
مساالورد
3rd Sep 2016, 8:33 PM
Yahya Alajori
Yahya Alajori - avatar
0
because java is a case sensitave language .
5th Sep 2016, 6:20 AM
rohit meshram
rohit meshram - avatar
0
Because it's a Class
6th Sep 2016, 5:30 PM
Amit Kakade
Amit Kakade - avatar
0
because it is keyword s
29th Jan 2017, 4:15 PM
wuhabita
0
Because String is finction in java script and which act as class. And as per class naming convention it is "String" not "string".
5th Jul 2017, 7:22 PM
Nirav Mehta
Nirav Mehta - avatar