zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    13.线性回归
    12.scikit-learn中的Scaler
    11.数据归一化
    oracle之二表的几种类型
    oracle之二表和表空间的关系
    oracle之二数据字典表和动态性能视图
    oracle之二检查点
    oracle之二管理undo
    oracle之二归档日志
    oracle之二日志挖掘log miner
  • 原文地址:https://www.cnblogs.com/25th-engineer/p/11255876.html
Copyright © 2011-2022 走看看