单项选择题
按照“先进先出”原则组织数据的数据结构是( )。
A.队列
B.栈
C.双向链表
D.二叉树
点击查看答案
<上一题
目录
下一题>
热门
试题
问答题
请写出下面程序的运行结果: public class Test extends TT{ public static void main(String args[]){ Test t=new Test( Tom. ); } public Test(String s){ super(s); System.out.print( How are you ); } public Test(){ this( I am Jack. ); } } class TT{ public TT(){ System.out.print( Hi! ); } public TT(String s){ this(); System.out.print( I am +s); } } 结果:【 】。
点击查看答案&解析
问答题
请阅读下列程序代码,然后将程序的执行结果补充完整。 程序代码: public class throwsException{ static void Proc(int sel) throws ArithmeticException,ArrayIndexOutOfBoundsException{ System.out.println( In Situation +sel); if(sel==0){ System.out.println(’no Exception caught ); return; } else if(sel==1){ int iArray[]=new int[4]; iArray[1]=3; } } public static void main(String args[]){ try{ Proc(0); Proc(1); } catch(ArrayIndexOutOfBoundsException e){ System.out.println( Catch +e); } finally{ System.out.println( in Proc finally ); } } } 执行结果: In Situation 0 no Exception caught 【 】 in Proc finally
点击查看答案&解析
相关试题
下列有关Java语言的叙述中,正确的是( )...