《11-Java软件工程师面试题.docx》由会员分享,可在线阅读,更多相关《11-Java软件工程师面试题.docx(3页珍藏版)》请在第壹文秘上搜索。
1、姓名:面试日期与时间:年月日:为了更全面地了解你的专业能力,请你尽力回答以下问题,谢谢合作!1. SQLSERVER有numeric类型自动序列递增,请简述一下ORACLE中是如何实现序列自动自增功能的。2. 写出ORACLE中的日期函数。3. 简述一下STRUCTS的组成和处理过程。4. Whatwillbetheoutputwhenyoucompileandexecutethefollowingprogram,publicclassBaseprivatevoidtest()inti=1;switch(i)caseO:System.out.println(zero);break;case 1
2、:System.out.println(onen);case 2:System.out.println(two);default:System.out.println(,default);)staticpublicvoidmain(Stringa)newBase().test();Selectmostappropriateanswer.a) oneb)one,defaultc) one,two,defaultd)defaulte) CompilationError,switchcannottakeanintasanargument5. Forwhatvalueofi,thefollowingp
3、rogramwilloutputLessthan20publicclassBaseprivatevoidtest()inti;if(i10)System.out.println(Lessthan10);elseif(i10)System.out.println(,Greaterthan10n);elseif(i20)System.out.prinlln(Greaterthan20);elseSystem.out.println(NotGreaterthan10u);1staticpublicvoidmain(Stringa)newBase().test();Selectmostappropri
4、ateanswer.a)0b)10c)11d)100e)None7. Themethodtest()throwsanIOException.Howdoyouspecifythat?importjava.io.*;.*;publicclassBaseprivatevoidtest()(Stringa=null;if(a=null)/throwsIOExceptionSelectallvalidanswersa)privatevoidtest()throwIOExceptionb)privatevoidtest()thrownewIOExceptionDc)privatevoidtest()throwsIOException()d)privatevoidtest()throwsIOExceptione)privatevoidtest()raiseIOException答题区:答题区:2.3.4.5.6.答案:1.通过设置序列DatetimetimestampMVCmodelviewcontrobcdb7.d