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

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.

主站蜘蛛池模板: 独山县| 双城市| 长垣县| 麻栗坡县| 蓝山县| 固阳县| 深圳市| 棋牌| 辽中县| 江都市| 明溪县| 龙游县| 厦门市| 丽水市| 竹北市| 丰原市| 新宾| 郑州市| 八宿县| 沈丘县| 驻马店市| 普兰店市| 浪卡子县| 鲁山县| 黑水县| 鄯善县| 崇左市| 海林市| 南开区| 镇远县| 松溪县| 瑞丽市| 涡阳县| 普格县| 南岸区| 科技| 广水市| 云林县| 东乌珠穆沁旗| 隆昌县| 枣庄市|