Operator Overloading

In other words, what do you get when you divide a String by an Int? And, can you change that behavior?

What the #$@&%!?

Many programming languages involve math. That math usually involves symbols serving as operators:

val thisIsNotQuitePi = 22 / 7

Here, / is a symbol representing the division operator.


Prev Table of Contents Next

This book is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.