移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

单选题

public static void parse(String str) {  try {  float f= Float.parseFloat(str);  } catch (NumberFormatException nfe) {  f= 0;  } finally {  System.out.println(f);  }  }  public static void main(String[] args) {  parse(”invalid”);  }  What is the result?() 

发布日期:2022-07-19

public static void parse(String str) {  try {  flo...
A

0.0

B

Compilation fails.

C

A ParseException is thrown by the parse method at runtime.

D

A NumberFormatException is thrown by the parse method at runtime.

标签: "暂无标签"

题王网让考试变得更简单

扫码关注题王,更多免费功能准备上线!