English

The statement used to find the total number of Strings present in the string array String s[] is ______. - Computer Applications

Advertisements
Advertisements

Question

The statement used to find the total number of Strings present in the string array String s[] is ______.

Options

  • s.length

  • s.length()

  • length(s)

  • len(s)

MCQ
Fill in the Blanks

Solution

The statement used to find the total number of Strings present in the string array String s[] is s.length.

Explanation:

  • In Java, the property length is used to determine the total number of elements in an array.
  • For a string array String s[], s.length returns the number of strings present in the array.
shaalaa.com
String Array
  Is there an error in this question or solution?
2024-2025 (April) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×