Introduction to Operator Overloading
Explore operator overloading and learn how to use custom operators in classes.
We'll cover the following
In Kotlin, we can add an element to a list using the +
operator. In the same way, we can add two strings together. We can check if a collection contains an element using the in
operator. We can also add, subtract, or multiply elements of type BigDecimal
, which is a JVM class that is used to represent possibly big numbers with unlimited precision.
Get hands-on with 1400+ tech skills courses.