Question: You have created a data class, Point, that holds two properties, x and y, representing a point on a grid. You want to use the hash symbol for subtraction on the Point class, but the code as shown will not compile. How can you fix it?
- You cannot; the hash symbol is not a valid operator.
- You should replace the word hash with octothorpe, the actual name for the symbol.
- You should use `minus` instead of hash, then type alias the minus symbol. // Note: How can you fix it?
- You need to replace operator with the word `infix`.
Answer: The correct answer of the above question is Option C:You should use `minus` instead of hash, then type alias the minus symbol. // Note: How can you fix it?