题目内容 (请给出正确答案)
[单选题]

下列代码执行时,产生的异常是()。 String s = null; s.concat(“abc”);

A.EOFException

B.NullPointerException

C.IOException

D.ArithmeticException

提问人:网友sxpi-songzht 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有5位网友选择 D,占比45.45%
  • · 有4位网友选择 A,占比36.36%
  • · 有1位网友选择 B,占比9.09%
  • · 有1位网友选择 C,占比9.09%
匿名网友 选择了D
[115.***.***.39] 1天前
匿名网友 选择了D
[115.***.***.39] 1天前
匿名网友 选择了D
[115.***.***.39] 1天前
匿名网友 选择了D
[59.***.***.152] 1天前
匿名网友 选择了D
[59.***.***.152] 1天前
匿名网友 选择了D
[59.***.***.152] 1天前
匿名网友 选择了A
[101.***.***.229] 1天前
匿名网友 选择了A
[101.***.***.229] 1天前
匿名网友 选择了A
[101.***.***.229] 1天前
匿名网友 选择了B
[180.***.***.108] 1天前
匿名网友 选择了D
[222.***.***.134] 1天前
匿名网友 选择了D
[253.***.***.110] 1天前
匿名网友 选择了D
[126.***.***.201] 1天前
匿名网友 选择了A
[46.***.***.33] 1天前
匿名网友 选择了A
[70.***.***.11] 1天前
匿名网友 选择了A
[164.***.***.98] 1天前
匿名网友 选择了C
[65.***.***.164] 1天前
匿名网友 选择了B
[180.***.***.108] 1天前
匿名网友 选择了C
[65.***.***.164] 1天前
匿名网友 选择了D
[253.***.***.110] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“下列代码执行时,产生的异常是()。 String s = n…”相关的问题
第1题
给定如下所示的JAVA代码,则运行时,会产生()类型的异常。

String s=null;

s.concat("abc");

A. ArithmeticException

B. NullPointerException

C. IOException

D. ClassNotFoundExceptio

点击查看答案
第2题
下列代码的执行结果是 f=open('writetest.txt','a+') f.write('This is a test file') f.write('Please print this file') print(f.readline()) f.seek(0) print(f.readlines())

A、This is a test file This is a test file Please print this file

B、This is a test filePlease print this file This is a test file Please print this file

C、['This is a test filePlease print this file']

D、This is a test filePlease print this file

点击查看答案
第3题
下列程序的输出结果为______ Sub Prin() Dim B As String A=1 B=A & Space(4)& A Print A Print Trim(B) End Sub
点击查看答案
第4题
有如下代码: public class Test{ public static void main(String args[]) { String str = new String("World"); char ch[] = {'H','e','l','l','o'}; change(str,ch); System.out.println(str + "and" + ch); } public static void change(String str, char ch[]) { str = "Changed"; ch[0] = 'C'; } } 运行后输出的结果是:

A、World and Hello

B、World and Cello

C、World and CelloChanged and Hello

D、Changed and Cello

点击查看答案
第5题
下列程序段的运行结果为_______。 import numpy as np A = np.array([[2, 3],[2, 1]]) B = np.array([[2, 0],[1, 2]]) C = A*B D = np.matmul(A, B) E = np.dot(A, B) print("C:\n",C) print("D:\n",D) print("E:\n",E)

A、C: [[7 6] [5 2]] D: [[4 0] [2 2]] E: [[7 6] [5 2]]

B、C: [[7 6] [5 2]] D: [[4 0] [2 2]] E: [[4 0] [2 2]]

C、C: [[4 0] [2 2]] D: [[7 6] [5 2]] E: [[4 0] [2 2]]

D、C: [[4 0] [2 2]] D: [[7 6] [5 2]] E: [[7 6] [5 2]]

点击查看答案
第6题
下面属于相对地址的是()

A. http://www.abC.com/default.asp

B. www.exambasE.com/email/default.asp

C. //www.teach.com/shopbag/default.asp

D. /www.exam.com/map.rar

点击查看答案
第7题
已知有语句String S = "123ABC";,下列语句不合法的是( )。

A、S.length( );

B、S.charAt(3);

C、S.append(“DE”);

D、S = "XY";

点击查看答案
第8题
下列选项中,结果为[图]的是( )A、[图]B、[图]C、[图]D、[...

下列选项中,结果为1.1.png的是( )

A、2A.png

B、2B.png

C、2C.png

D、2D.png

点击查看答案
第9题
下面4项中合法的字符常数是:( )

A、ABC$

B、"ABC"

C、'ABC'

D、ABC

点击查看答案
第10题
return语句不是Java语言中的跳转语句。
点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信