07-20-2023, 06:27 AM
I have some code that I've been using for years in Java, but need it in Kotlin (its interfaces extend collections interfaces). Some classes are serializable. When I try the obvious, I get "Cannot access 'Serializable': it is internal in kotlin.io":
class Foo(val someField:Int): Serializable {
companion object {
private const val serialVersionUID = 20180617104400L
}
}
So, do I just import java.io.Serializable, or will that cause other issues?
class Foo(val someField:Int): Serializable {
companion object {
private const val serialVersionUID = 20180617104400L
}
}
So, do I just import java.io.Serializable, or will that cause other issues?