x="Lorna\'s Toys"
What will be the length of a string?
Answers
Answered by
0
Answer:
To calculate the length of a string in Java, you can use an inbuilt length() method of the Java string class. In Java, strings are objects created using the string class and the length() method is a public member method of this class. So, any variable of type string can access this method using the . (dot) operator.
Follow ♥️
Similar questions