How to use Cloneable?

clone is protected hence it will be subclass private in Kotlin. You will want to override the implementation as public so you can use it as you wish.

/**
 * Created by abubacker.siddik
 */
open class TempA : Cloneable {
    val s = "123"
    val i = 123
    val d = 1.23

    override public fun clone(): Any {
        return super.clone()
    }
}