Created
March 4, 2010 01:47
-
-
Save adamrabung/321304 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
object PersonExample { | |
case class Person(val firstName:String, lastName:String, dept:String, phone:String, age:Int) | |
def main(args:Array[String]) = { | |
val billy = Person("Billy", "Johnson", "Acct", "5123", 33) | |
val bobby = Person("Bobby", "Johnson", "Acct", "5123", 33) | |
val bonusForPerson = Map( | |
billy -> 100, | |
bobby -> 10000 | |
) | |
println("Billy bonus: " + bonusForPerson.get(billy)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment