progs/hello-world.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 29 Aug 2020 16:05:59 +0100
changeset 342 aa47abb9e723
parent 335 7e00d2b13b04
child 353 bb6074814a73
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
335
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     1
object Hello //extends App 
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     2
{ 
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     3
  var x = 1 
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     4
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     5
  println("test")
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     6
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     7
  x = x + 2
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     8
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
     9
  println("foo")
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
    10
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
    11
  synchronized { x = x + 1 }
7e00d2b13b04 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 202
diff changeset
    12
32
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  println("hello world")
45557ad18ea6 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
}