Equality in Kotlin

In Java, when comparing whether 2 objects initialized from a class are equal or not, we need to implement 2 equals() and hashCode() methods for that class and will use the equals() method to compare them. For example, I have…

Variables in Kotlin

In Kotlin, we use two keywords var and val to declare variables. The difference between these two keywords is that var is used to declare mutable variables, and val is used to declare immutable variables. In short, for you to…