MEMohamed Ewidainmohamedewida.hashnode.dev·Feb 9, 2023 · 2 min readData Classes in kotlinData classes are normal classes mainly created to hold data data keyword is used to mark a class as a data class. data class DataClass(val id:Int, val name: String) Q. why data classes is used to hold data ? or what is the difference between it and...00
MEMohamed Ewidainmohamedewida.hashnode.dev·Feb 9, 2023 · 2 min readAbstract classes vs Interfaces in KotlinAs you may know, interfaces are just abstract functions but with subtle differences. Abstract means two things : this class can’t be instantiated this class can have fields with no implementation (abstract fields like abstract functions or abstract...00