+ 1

String is an object or data type?

string

1st May 2017, 1:39 PM
Areena Memon
4 Answers
+ 24
String is a class in java and reference data type. String is an array of character so it is not a primitive data type.
1st May 2017, 1:46 PM
Dev
Dev - avatar
+ 1
a string is a data type. data types are used to specify what kind of data is stored in a variable, or will be returned by a function.
1st May 2017, 1:42 PM
Cailyn Baksh
+ 1
string is a data type
1st May 2017, 1:43 PM
⏩▶Clau◀âȘ
⏩▶Clau◀âȘ - avatar
+ 1
String is a variable type data.so we can assign any variable to a string type.we can also have string class which have few methods which are used to manipulate string variables. For example:- string s; s="ravi"; System.out.println(s.length()); Here in the output we got string length i.e, 4
19th May 2017, 6:55 AM
Nandini Injarapu
Nandini Injarapu - avatar