working with scala examples 1

commandline session

$ 4.2.29 15 515---> scala
Welcome to Scala version 2.9.2 (OpenJDK 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.

scala> 4*2-7
res0: Int = 1

scala> res0+1
res1: Int = 2

scala> 2*0.4
res2: Double = 0.8

scala> "hello"
res3: java.lang.String = hello

scala> "hello"+res3
res4: java.lang.String = hellohello

scala> "hello"+res2
res5: java.lang.String = hello0.8

scala> "hello res2"
res6: java.lang.String = hello res2

scala>







Copyright © 2009,  2010,  2011,  2012,  2013, 2014     BeautifulWork Project    e-mail:  ahiliation@yahoo.co.in
BeautifulWork Project comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.