Kotlin
//scala
class Cafe {
def bufCoffee(cc: CreditCard): Coffee = {
val cup = new Coffee() //세미콜론이 없어도 된다
cc.charge(cup.price) //신용카드를 실제로 청구한다.
cup //마지막 줄을 반환
}
}Last updated
//scala
class Cafe {
def bufCoffee(cc: CreditCard): Coffee = {
val cup = new Coffee() //세미콜론이 없어도 된다
cc.charge(cup.price) //신용카드를 실제로 청구한다.
cup //마지막 줄을 반환
}
}Last updated