Computer Applications

Which of these methods of class String is used to obtain length of String object?

  1. get( )
  2. Sizeof( )
  3. lengthof( )
  4. length( )

Java String Handling

3 Likes

Answer

length( )

Reason — length( ) returns the length of a given String object.

Answered By

2 Likes


Related Questions