Nov 16, 2023
In Kotlin you can do the following:
```
data class Train(val name: String, private val _stations: List<String>) {
val stations = _stations.toList()
}
```
I'm not sure it's the exact same as the Java Record still, but we have an immutable stations list and still kept the class a data class.