码迷,mamicode.com
首页 > 其他好文 > 详细

scala速成记录1

时间:2015-06-19 01:23:26      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:

选择  Learning Scala这本书,两百多页,足够薄。

安装 http://www.scala-lang.org/  下载Binary的版本。bin里边有所有操作系统下运行的可以运行的交互式shell ,Scala中叫做RPEL。交互界面很像python和Ruby 很容易上手。

Scala是强类型语言,

A type is the kind of data you are working with, a definition or classification of data. All data in Scala corresponds to a specific type, and all Scala types are defined as classes with methods that operate on the data.

 

Scala有GC机制(基于JVM的都会有GC机制)

 

Scala赋值语法:<name>:<type>=<literal>

 

Scala的数据类型  Byte, Short,Int,Long,Float,  Double, String,Char 长度和java一致。

 

Scala的变量  var <identifier>[: type]= <data>

如果不指定类型,编译器会帮助指定类型,但是类型一旦指定,则无法改变。

 

scala速成记录1

标签:

原文地址:http://www.cnblogs.com/skytraveler/p/4587333.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!