Ask Question
24 October, 06:21

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. 24 October, 06:36
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers