This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Constructor of a class  RSS feed

 
Chaturaka Gunatilaka
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The constructor of a class must not have a return type.
Is this statement correct?
please give me the reason.
Thank you.
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That looks like your homework question.
I suggest you do a little searching on this site as this question has been asked several times here recently.
 
Chaturaka Gunatilaka
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tony Docherty wrote:That looks like your homework question.
I suggest you do a little searching on this site as this question has been asked several times here recently.


I got the answer but couldn't find the reason.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crossposting
 
Tony Docherty
Bartender
Posts: 3268
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the heads up.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chaturaka Gunatilaka wrote:I got the answer but couldn't find the reason.

What answer did you find?

Did you try searching this site? I know it was discussed not very long ago in another thread in this forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!