Computer Applications

Which of these constructors is used to create an empty String object?

  1. String( )
  2. String(void)
  3. String(0)
  4. None of the mentioned

Java String Handling

5 Likes

Answer

String( )

Reason — String( ) constructor is used to create an empty String object as it does not specify any String value.

Answered By

4 Likes


Related Questions