+ 1
What is a string
5 Answers
+ 8
It's a sequence of characters and also a immutable object means you can not modify it.
An array of characters works same as Java string.Ā
Example:-
char[]Ā ch={'j','a','v','a','t','p','o','i','n','t'};Ā Ā
StringĀ s=newĀ String(ch);Ā Ā
is same as
String s = "javatpoint";
+ 3
String is a text object.
Often represented as sequence of characters between a pair of " " or ' '.
+ 1
it's a word or sentence