题目内容
(请给出正确答案)
提问人:网友fly3118
发布时间:2022-01-07
[主观题]
下列程序的运行结果是()。 public class test{ private String[]data={¨10","10.5"}, public
void fun(double S=0; for(int i=0;i<3;i++){ try{ s=s+Integer.parseInt(data[i]); catch(Exception e){ System.out.print(“errorl:”+data[i])。 } } } public static void main(string[]args){ try{ test d=new test; fun; }catch(Exception e){ System.out.println("error2") } } }
A.errorl:10.5
B.error2
C.errorl:10.5 error2
D.以上都不对
简答题官方参考答案
(由简答题聘请的专业题库老师提供的解答)
查看官方参考答案