Which Java method is used to convert an object to string?

53. Which Java method is used to convert an object to string?

  1. createString()
  2. toString()
  3. object.string()
  4. newString()

Answer: B) toString()

Explanation:

Java method toString() is used to convert an object to string.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.