Ask Question
15 September, 07:47

The length property of the String object returns

the number of words in the string

the index of the first character in the string

the index of the last character in the string

the number of characters in the string

+5
Answers (1)
  1. 15 September, 08:05
    0
    the number of characters in the string.

    Explanation:

    length property of a String object returns the total count of the characters in the string or provides the length of the string simply.

    For example:-

    import java. util.*;

    import java. lang.*;

    import java. io.*;

    class length

    {

    public static void main (String[] args)

    {

    String s="IamNumber4";

    int l=s. length (); //using length method on string object ...

    System. out. println (l);

    }

    }

    Output:-

    10

    The code written above is in java. The length () method returned the count of characters of the string s that is a actually 10.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “The length property of the String object returns the number of words in the string the index of the first character in the string the index ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers