Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case class User(id: String, name: String)
- var x = Map[Int, User]()
- x += (1-> User("100", "james"), 2->User("101", "lucy"))
- var y: User = null
- x.foreach(p=> println(p._2.name))
- x.foreach(p=> y=p._2)
- var loop = 0
Add Comment
Please, Sign In to add comment