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

  • Learning Scala Programming
  • Vikash Sharma
  • 104字
  • 2021-06-30 19:07:48

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.

主站蜘蛛池模板: 涪陵区| 页游| 辽阳县| 安康市| 阿尔山市| 西林县| 顺义区| 鄂伦春自治旗| 龙井市| 三门峡市| 石阡县| 梅河口市| 西城区| 保山市| 黑水县| 甘洛县| 遵义市| 顺昌县| 锦屏县| 金门县| 乐平市| 锦州市| 贺兰县| 兴义市| 阿鲁科尔沁旗| 聂荣县| 木兰县| 泰和县| 安阳县| 宁安市| 夹江县| 邯郸市| 乐至县| 洞头县| 蓝山县| 礼泉县| 嫩江县| 泰来县| 栖霞市| 贺州市| 中方县|