给出下面代码: 1)classParent{ 2)privateStringname; 3)publicParent(){} 4)} 1、5)publicclassChildextendsParent{ 6)privateStringdepartment; 1、7)publicChild(){} 8)publicStringgetValue(){returnname;} 9)publicstaticvoidmain(Stringarg[]){ 10)Parentp=newParent(); 11)} 12)} 那些行将引起错误?()
A.第3行
B.第6行
C.第7行
D.第8行
第1题:
下面代码的输出结果是 list1 = [1,2,3] list2 = [4,5,6] print(list1+list2)
A.[4,5,6]
B.[1, 2, 3, 4, 5, 6]
C.[1,2,3]
D.[5,7,9]
第2题:
下面代码的输出结果是______。 L = [1,2,3,4,5] s1 = ','.join(str(n) for n in L) print(s1)
A.[1,2,3,4,5]
B.1,,2,,3,,4,,5
C.[1,,2,,3,,4,,5]
D.1,2,3,4,5
第3题:
1、 给出以下代码,该程序的运行结果是()。class Example{ public static void main(String args[]){ int [] a={1,2,3,4,5}; System.out.println(a[3]); } }
A.1
B.2
C.3
D.4
第4题:
下面代码的输出结果是 L = [1,2,3,4,5] s1 = ','.join(str(n) for n in L) print(s1)
A.1,2,3,4,5
B.1,,2,,3,,4,,5
C.[1,,2,,3,,4,,5]
D.[1,2,3,4,5]
第5题:
18、下面代码的输出结果是 L = [1,2,3,4,5] s1 = ','.join(str(n) for n in L) print(s1)
A.1,2,3,4,5
B.1,,2,,3,,4,,5
C.[1,,2,,3,,4,,5]
D.[1,2,3,4,5]