网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
interfaceBeta{}classAlphaimplementsBeta{StringtestIt(){returnTested”;}}publicclassMain1{staticBetagetIt(){returnnewAlpha();}publicstaticvoidmain(String[]args){Betab=getIt();System.out.println(b.testIt());}}Whatistheresult?()
A.Tested
B.Compilationfails.
C.Thecoderunswithnooutput.
D.Anexceptionisthrownatruntime.
参考答案
更多 “ interfaceBeta{}classAlphaimplementsBeta{StringtestIt(){returnTested”;}}publicclassMain1{staticBetagetIt(){returnnewAlpha();}publicstaticvoidmain(String[]args){Betab=getIt();System.out.println(b.testIt());}}Whatistheresult?()A.TestedB.Compilationfails.C.Thecoderunswithnooutput.D.Anexceptionisthrownatruntime. ” 相关考题
考题
以下正确的程序段是A.char str1[ ]="12345", str2[ ]="abcdef";B.char str[10],*st="abcde";strcat(str,st);C.char str[10]=" "。*st="abcde";strcat(str,st);D.char *st1="12345", *st2="abcde";strcat(st1, st2);
考题
ST段下移总负荷的计算公式为A、ST段下移次数×ST段下移程度B、ST段下移程度×ST段下移持续总时间C、每次ST段下移程度×每次ST下移持续时间D、ST段下移次数×ST段下移时间E、24小时的ST段下移总和除以ST段下移次数
考题
以下正确的程序段是A.char str1[ ]="12345",str2[ ]="abcdef";B.char str[10],*st="abcde";strcat(str,st);C.char str[10]=" "。*st="abcde";strcat(str,st);D.char*st1="12345",*st2="abcde";strcat(st1,st2);
考题
在顺序栈中,判断栈s为空的条件是____。A.t.base == NULLB.st.top == st.stacksizeC.st.top-st.base>=st.stacksizeD.st.top == st.base
考题
在顺序栈中,判断栈s满的条件是____。A.st.base == NULLB.st.top == st.stacksizeC.st.top-st.base>=st.stacksizeD.st.top == st.base
考题
10、经过以下栈的操作后,isEmpty(st)的返回值为()。 initStack(st); push(st,a); push(st,b); pop(st,x); pop(st,y);A.aB.bC.1D.0
考题
【单选题】判断字符串st1和st2是否相等,应使用:()A.if(st1=st2)B.if(st1==st2)C.if(strcpy(st1,st2))D.if(strcmp(st1,st2)==0)
热门标签
最新试卷