Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Error:(4, 52) value amt is not a member of Bill
- def compare(that: Bill): Int = (this.amt - that.amt)
- import scala.math.Ordered
- class Bill(amt : Int) extends Ordered[Bill] {
- def compare(that: Bill): Int = (this.amt - that.amt)
- }
- object Test extends App {
- val one = new Bill(10)
- val two = new Bill(20)
- println(one < two)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement