Scala 中类型约束—视图界定(View bounds)

/** * 使用视图界定 自定义隐式转换 比较两个person的年龄的大小 */ object ViewBoundsDemo { def main(args: Array[String]): Unit = { val james = new Person2("james", 30) val kebe = new Person2("kebe", 35) imp
相关文章
相关标签/搜索