【发布时间】:2015-09-16 04:45:43
【问题描述】:
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))
【问题讨论】:
标签: scala generics types wildcard