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

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.

主站蜘蛛池模板: 汶上县| 门源| 墨江| 区。| 罗城| 乌兰察布市| 同德县| 靖宇县| 涞水县| 台北市| 正安县| 双牌县| 徐闻县| 衡山县| 鄂托克前旗| 石家庄市| 息烽县| 从化市| 永泰县| 滦平县| 海丰县| 土默特右旗| 澄城县| 锦屏县| 井研县| 凉城县| 鹿邑县| 行唐县| 巩义市| 本溪市| 滕州市| 延川县| 长春市| 长岛县| 安溪县| 沅陵县| 涪陵区| 平遥县| 休宁县| 荣昌县| 乐至县|