官术网_书友最值得收藏!

Literals

In the previous discussion, we've seen a String literal and an Integer too. Here, we'll discuss all available literals, and how to define them in Scala. If you're coming from a Java background, then quite a few will be the same for you: Integer, Floating point, Boolean, Character, and String are similar. Along with those, the Tuple and Function literals can be treated as something new to learn. All the literals are listed as follows:

  • Integer literals
  • Floating point literals
  • Boolean literals
  • Character literals
  • String literals
  • Symbol literals
  • Tuple literals
  • Function literals

We'll discuss them one by one. Let's start with Integer literals.

主站蜘蛛池模板: 罗山县| 吉水县| 兴安盟| 萨迦县| 伊宁市| 阿瓦提县| 丹江口市| 吉安县| 黄山市| 柳林县| 文安县| 新绛县| 柏乡县| 石阡县| 英山县| 榆社县| 郴州市| 合肥市| 龙川县| 手游| 临安市| 搜索| 兰考县| 瑞丽市| 冷水江市| 阜平县| 辽阳市| 兴业县| 新干县| 马山县| 桃园市| 塔城市| 玉田县| 连江县| 商洛市| 阿拉善左旗| 云安县| 安陆市| 定南县| 宁河县| 石河子市|