Skip to content

Instantly share code, notes, and snippets.

@notyy
Created November 25, 2014 02:16
Show Gist options
  • Save notyy/e474e8fb7159d860346e to your computer and use it in GitHub Desktop.
Save notyy/e474e8fb7159d860346e to your computer and use it in GitHub Desktop.
class Something{
var x: Double = _
var y: String = _
var z: Char = _
}
val s = new Something
s.x
s.y
s.z
//=================
scala> val s = new Something
s: Something = Something@74093613
scala> s.x
res7: Double = 0.0
scala> s.y
res8: String = null
scala> s.z
res9: Char = ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment