Tại sao code thế này lại báo lỗi ở chỗ abstract ạ:
abstract data class Category( var id: Long, var name: String )
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Em xoá
abstract
điTrên menu em chọn Tools -> Kotlin -> Decomplie Kotlin to Java, sau đó em nhấn vào Decompile em sẽ thấy:
Như vậy em có thể thấy bản chất data class được dịch ra là lớp final, vậy em không thể thêm abstract được nhé