Created
March 2, 2015 13:57
-
-
Save shigemk2/c6ae24c314753a51ccc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// class Person private (name: String) | |
// val p = new Person("Mercedes") | |
class Brain private { | |
override def toString = "This is the brain." | |
} | |
object Brain { | |
val brain = new Brain | |
def getInstance = brain | |
} | |
val brain = Brain.getInstance | |
println(brain) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment