Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

new String() vs toString  RSS feed

 
Parameswaran Thangavel
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Can anybody tell me the diff btween the new String and toString....
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
new String() gives you a new String object. The toString() function returns a String representation of the object on which the function was called. Not advanced though
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, not at all advanced. Let's continue this discussion in JiG(Beginner).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!