Which programming language is this?
class Config private constructor(val url: String) {
companion object {
fun default() = Config("http://localhost")
}
}
val cfg = Config.default()
Answer: Kotlin
A
Play Programming Languages ▸
companion object inside a class with a private constructor(val url: String) is Kotlin.