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

Is my class succeed Object too?  RSS feed

 
xie yufei
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class. "

Is my class succeed Object too, and my class has method toString() and so on?
 
Jeff Albertson
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you have a question, first ask yourself -- can I write code to explore my question and test my assumptions? Does my class have a toString method:
 
xie yufei
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you,Jeff!Next time I know how to test my question, and share it with friends.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!