#scala
Classes in Scala are static templates that can be instantiated into many objects at runtime.
If you want to change selection, open document below and click on "Move attachment"
Classes - Scala Documentation
<span>Classes in Scala are static templates that can be instantiated into many objects at runtime.
Here is a class definition which defines a class Point:
class Point(xc: Int, yc: Int) {
var x: Int = xc
var y: Int = yc
def move(dx: Int, dy: Int) {
x = x + dx
y = y + dy
Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details