-->
当前位置:首页 > 题库 > 正文内容

单选题:h0306. .在对htmlText进行匹配时,应该使用哪一种case语句?

Luz3年前 (2022-05-04)题库353


100.在对htmlText进行匹配时,应该使用哪一种case语句?

def getHtml(url: String): Try[String] = {...}

val myUrl = "http://justtest.org"

val htmlText = getHtml(myUrl)

val result = htmlText match {
???

}

  case None(x) =>

  case Failure(e) =>

  case Url(y)

  case Try2(v) =>



A.case Some(x) =>
B.case Success(v) =>
C.case String(x) =>
D.case Try1(v) =>


答案:B

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。