mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
12 lines
238 B
Kotlin
12 lines
238 B
Kotlin
class C {
|
|
[kotlin.jvm.overloads] public fun foo(o: String = "O", k: String = "K"): String {
|
|
return o + k
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val c = C()
|
|
val m = c.javaClass.getMethod("foo")
|
|
return m.invoke(c) as String
|
|
}
|