mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
Quoted from https://kotlinlang.org/docs/reference/classes.html "On the JVM, if all of the parameters of the primary constructor have default values, the compiler will generate an additional parameterless constructor which will use the default values. This makes it easier to use Kotlin with libraries such as Jackson or JPA that create class instances through parameterless constructors."
4 lines
65 B
Kotlin
Vendored
4 lines
65 B
Kotlin
Vendored
package test
|
|
|
|
class A(val a: Int = 1, val b: String = "default")
|