Inflearn Community Q&A
34강 리플렉션강의중에서
Written on
·
439
0
class TestClass() {
constructor(a:Int) : this() {
}
constructor(a:Int, b: Int) : this() {
}
fun testMethod() {
}
}
fun main(){
val t1 : TestClass = TestClass()
println("추상클래스인지아닌지: ${t1::class.isAbstract}") // 변수명: company_name
}
androidkotlin
Answer 3
0
0
0
shafeel2
Questioner
위코드를 실행하면 아래와 같은 에러가 발생합니다
Exception in thread "main" kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:88)
at kotlin.jvm.internal.ClassReference.isAbstract(ClassReference.kt:62)
at MainKt.main(Main.kt:16)
at MainKt.main(Main.kt)





