scala tips

java-verion

java-jarscala-2.8.0.final-installer.jar

ThenameScalaisacontractionofthewordsscalablelanguage.

sudoln-s/home/wenbo/scala/bin/scala/usr/bin/scala

scala-version

NotethatScalausessquarebrackets([...])forparameterizedtypes,whereasJavausesanglebrackets(<...>).

Scalaallowsanglebracketstobeusedinmethodnames,e.g.,naminga

“lessthan”method<iscommon.

Usinganequalssignalso

remindsusthatevenfunctionsarevaluesinScala,whichisconsistentwithScala’ssupportoffunctionalprogramming

相关推荐