|
|
|
|
- TOP>
- Scala Tips
Scala Tips
日々のアプリケーション開発の中で気付いたことを書き留めてゆく。Scalaは2.10系以降に対応している。
| JVMのメモリ割り当てサイズを指定する | -J-Xmx, -J-Xms |
| String補間 | f補間子 |
| 配列の初期化、全要素に対する処理 | Array, foreach, length, size |
| ListBufferの初期化、全要素に対する処理 | ListBuffer, foreach, empty |
| 日付のフォーマット | String.format, printf, SimpleDateFormat |
| 正規表現による文字列のマッチと置換 | Regex, r, match |
| If式 | if |
| コマンドライン引数を取得する | main, args, App |
| For式 | for |
| Match式(Switch) | match |
| メソッド | def |
| JVMを終了する(プログラムを終了する) | exit |
| 文字列と数値の変換 | toString, toInt, toDouble, toLong, toByte, toFloat, toBoolean |
| タプル | Tuple |
Copyright© 2004-2018 モバイル開発系(K) All rights reserved.
|