Scala
Meet_again007
Miss you!单身贵族,姐姐不谈感情
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Scala解析Json获取指定key的值
import scala.util.parsing.json._ object Scala_Json { def main(args: Array[String]): Unit = { def regJson(json:Option[Any])=json match{ case Some(map:Map[String,Any]) => map } ...原创 2020-01-11 17:14:32 · 2249 阅读 · 0 评论 -
scala2.11读取文件
1.读取行 要读取文件的所有行,可以调用scala.io.Source对象的getLines方法: import scala.io.Source val source = Source.fromFile("myfile.txt", "UTF-8") val lineIterator = source.getLines val lines1 =lineIterator.toArray val li...原创 2020-01-11 14:51:58 · 323 阅读 · 0 评论
分享