Pros and cons of immutability
At first think, it seems like having a variable that you can't change is a terrible idea and that we should always use var instead of val. But, in Scala, we actually prefer immutable variables (val, that is) where possible.
In this exercise, you'll categorize statements about immutability as either a pro or a con.
แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร
Introduction to Scala
แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำจริง
เปลี่ยนทฤษฎีให้เป็นการลงมือทำด้วยแบบฝึกหัดเชิงโต้ตอบหนึ่งในของเรา
เริ่มแบบฝึกหัด