Is String a primitive data type or an object in Java?
Answers
Answered by
4
Answer -
String is an object, in android or java it isn't a primitive type at all. you can use strings to store in SharedPreferences. Strings are objects of the String class (java.lang.String). ... This is why a String is not a primitive data type, it is instead a myriad of attributes (int length, char[position], etc.).
I hope it help u ☺
Answered by
0
String is an Object in java as primitive data have fixed size but string does not
Similar questions
Math,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
Computer Science,
1 year ago
Biology,
1 year ago
English,
1 year ago
Math,
1 year ago