2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 22:38:04 +02:00
This commit is contained in:
Martin Thoma 2014-03-07 19:17:17 +01:00
parent 7efffcec0c
commit 7a39159bdb
5 changed files with 19 additions and 10 deletions

View file

@ -1,6 +1,5 @@
#!/usr/bin/env scala
!#
def promptprint (s: String) = {println ("> " + s)}
$ scala
Welcome to Scala version 2.9.2 [...]
println ("Hallo ")
args foreach promptprint
scala> println("Hello world")
Hello world

View file

@ -3,4 +3,6 @@ class Person (
var lastName: String,
age: Int) {
println("This is the constructur.")
def sayHi() = println("Hello world!")
}

View file

@ -0,0 +1,2 @@
val anna = new Person("anna", "bern", 18)
anna.sayHi()