Ask Question
4 June, 00:58

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

+2
Answers (1)
  1. 4 June, 01:55
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers