python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Kotlin. How to declare constant?
I have class, which in primary constructor has some fields:
class SomeData(val counter: Int...) { // some logic}
I need to create a constant. I usually do it like this:
companion object {
priva...
testivanivan
Votes: 0
Answers: 3
Kotlin: How to use custom setters in primary constructor
I don't know how to make it so that when creating an object the values of the parameters "pass through the setters" the closest I've gotten is to duplicate the code, use once in the creation...
Antonio SPR
Votes: 0
Answers: 1