0
String is an object or a class ?
i am confused here it is written String is an object and i thought String is a class and its variable name is the object
3 Answers
+ 2
they are be both. you have you object String, wich is an instance of String class.
Thats why you can acess to .lenght (for example) property of String class.
+ 2
String someName = "some text" ;
String is a class, someName is an object of String class, so you can use all the public methods from String class from your someName variable
Like nahuel said
someName.lenght()
0
class