scala> Try(Class.forName("scala.util.Try"))
warning: there was one feature warning; re-run with -feature for details
res54: scala.util.Try[Class[?0]] forSome { type ?0 } = Success(class scala.util.Try)
有人能解释一下?0
类型是什么吗?当我尝试在代码中使用它时,它无法编译。
val tryMongo: Try[Class[?0]] = Try(Class.forName(MONGO_COLLECTION_CLASS))
forSome { type ?0 }
是什么?匿名类型还是其他什么东西? - Abhijit Sarkar