I was just looking into a Play / scala example with hibernate. I case class I found some thing like this ....
class Buddy(first: String, last: String) {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
var id: Int = _
var firstName: String = first
var lastName: String = last
def this() = this (null, null)
override def toString = id + " = " + firstName + " " + lastName
}
Can any one explain me meaning of this line "var id: Int = _".
What the "__" meaning exactly in this code. It not not related with getter method I guess as in this case I guess getter method name will be id_.
Thanks in advance ...