+ 1

What is a string

22nd Jun 2019, 7:55 PM
Muskan Pathan
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";
22nd Jun 2019, 8:37 PM
AĶ¢J
AĶ¢J - avatar
+ 3
String is a text object. Often represented as sequence of characters between a pair of " " or ' '.
22nd Jun 2019, 8:44 PM
Seb TheS
Seb TheS - avatar
+ 1
it's a word or sentence
22nd Jun 2019, 8:12 PM
āœ³AsterisKāœ³
āœ³AsterisKāœ³ - avatar