You found this program in the "naming" section of Bad Programming Guide:
object TrickyPrinter extends App {
val + = 1
val - = 2
val * = (+)*(-)
val / = (*)/((-)-(+))
println(/)
}
What does this program print?
You found this program in the "naming" section of Bad Programming Guide:
object TrickyPrinter extends App {
val + = 1
val - = 2
val * = (+)*(-)
val / = (*)/((-)-(+))
println(/)
}
What does this program print?
Create a free account to access the full topic