Skip to content

Instantly share code, notes, and snippets.

@adamrabung
Created March 4, 2010 01:47
Show Gist options
  • Save adamrabung/321304 to your computer and use it in GitHub Desktop.
Save adamrabung/321304 to your computer and use it in GitHub Desktop.
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