#scala
values defined with the val construct are different from variables defined with the var construct (see class Point above) in that they do not allow updates; i.e. the value is constant
If you want to change selection, open document below and click on "Move attachment"

Classes - Scala Documentation
println(pt) pt.move(10, 10) println(pt) } } The program defines an executable application Classes in form of a top-level singleton object with a main method. The main method creates a new Point and stores it in value pt. Note that <span>values defined with the val construct are different from variables defined with the var construct (see class Point above) in that they do not allow updates; i.e. the value is constant. Here is the output of the program: (1, 2) (11, 12) Please enable JavaScript to view the comments powered by Disqus. blog comments powered by Disqus