0 votes
in JAVA by
How to find the length of a string in java?

1 Answer

0 votes
by

How to find the length of a string in java?

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.

The length() method counts the total number of characters in a String.

Related questions

0 votes
asked Oct 18, 2020 in JAVA by sharadyadav1986
0 votes
asked Oct 19, 2020 in JAVA by rahuljain1
...