Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyKotlindata classesSingle-choice MCQ

Are these two User instances equal, and why?

data class User(val id: Int) { var role: String = "guest" } val a = User(1).apply { role = "admin" } val b = User(1).apply { role = "guest" } println(a == b)