Computer Science, asked by kurellasaitejas2836, 1 year ago

Is String a primitive data type or an object in Java?

Answers

Answered by anju2730
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 jaguar12012004
0

String is an Object in java as primitive data have fixed size but string does not

Similar questions