Multiple distinct objects: Difference between revisions

→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details
(Added Kotlin)
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
Line 670:
 
=={{header|Kotlin}}==
<lang scala>// version 1.1.12
 
class Foo {
Line 678:
id = ++numCreated // creates a distict id for each object
}
 
companion object {
private var numCreated = 0