• scala基本数据类型学习


      Scala does not support octal literals; integer literals that start with a 0, such as 031, do not compile.

      If an integer literal ends in an L or l, it is a Long; otherwise it is an Int.

      If a floating-point literal ends in an F or f, it is a Float; otherwise it is a Double. Optionally, a Double floating-point literal can end in D or d.

      Character literals are composed of any Unicode character between single quotes.

      In addition to providing an explicit character between the single quotes, you can identify a character using its Unicode code point. To do so, write u followed by

    four hex digits with the code point, like this:

      scala> val d = 'u0041'

      d: Char = A

      scala> val f = 'u0044'

      f: Char = D  

      This identifier is treated as identical to BAD, the result of expanding the two Unicode characters in the code above. In general, it is a bad idea to name

    identifiers like this because it is hard to read. Rather, this syntax is intended to allow Scala source files that include non-ASCII Unicode characters to

    be represented in ASCII.

      A string literal is composed of characters surrounded by double quotes.

      You start and end a raw string with three double quotation marks in a row ("""). The interior of a raw string may contain any characters whatsoever, including

    newlines, quotation marks, and special characters, except of course three quotes in a row.

  • 相关阅读:
    js操作class值
    四、多表连接
    三、约束
    根据出生日期计算年龄
    二、MySql数据操作(二)
    一、MySql基本语句(一)
    jquery基本操作
    纯js实现全选,全不选,反选
    css的基础知识1
    表格的使用
  • 原文地址:https://www.cnblogs.com/25th-engineer/p/11255876.html
Copyright © 2020-2023  润新知