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

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.

主站蜘蛛池模板: 永靖县| 云阳县| 阜新| 广宗县| 凤阳县| 武山县| 商河县| 都安| 肥东县| 赤壁市| 白玉县| 大荔县| 石家庄市| 菏泽市| 洪雅县| 浦县| 刚察县| 吐鲁番市| 如皋市| 沂源县| 安达市| 北票市| 循化| 定南县| 兰考县| 马鞍山市| 郴州市| 和硕县| 迁西县| 九龙县| 湄潭县| 涟水县| 凌云县| 东山县| 柳林县| 固原市| 宁国市| 洛隆县| 宝清县| 岳普湖县| 大连市|