Changes between Version 77 and Version 78 of Scala-sandbox-docs
- Timestamp:
- 07/05/08 21:00:16 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Scala-sandbox-docs
v77 v78 164 164 * `trait` 165 165 * `object` 166 * シングルトンオブジェクトを定義します。 167 {{{ 168 object Hello { 169 def greeting(msg: String): String = { 170 msg + ", world!" 171 } 172 } 173 }}} 174 * オブジェクト名.メソッド名(...)で定義したメソッドを呼び出すことができます。シングルトンオブジェクトを利用することで、Javaのstaticメソッドに相当することができます。 175 {{{ 176 println(Hello.greeting("Hello")) // Hello 177 }}} 166 178 * `case class` 167 179 * パターンマッチ(via http://rainyday.blog.so-net.ne.jp/2007-01-01)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)