Java常见面试题集--面试题全面综合(一).pdf_第1页
Java常见面试题集--面试题全面综合(一).pdf_第2页
Java常见面试题集--面试题全面综合(一).pdf_第3页
Java常见面试题集--面试题全面综合(一).pdf_第4页
Java常见面试题集--面试题全面综合(一).pdf_第5页
已阅读5页,还剩38页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1 1 2 3 4 2 String byte int char long float double boolean short java lang String final StringBuffer 3 int Integer Java Int java Integer java int Java booleanBoolean charCharacter byteByte shortShort intInteger longLong floatFloat doubleDouble null Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 4 String StringBuffer JAVA String StringBuffer String StringBuffer StringBuffer StringBuffers 5 java 6 Servlet Servlet CGI Servlet init service service doXXX doGet doPost destroy cgi servlet service CGI servlet 7 ArrayList Vector LinkedList ArrayList Vector Vector synchronized ArrayList LinkedList 8 EJB SessionBean EntityBean StatefulBean StatelessBean EJB Session Bean Entity Bean Message Driven Bean JNDI RMI JAT SessionBean J2EE EJB EntityBean SessionBean EntityBean Session Bean Stateful Session Bean Stateless Session Bean Session Bean method Stateful Session Bean Stateful Session Bean Stateless Session Bean Stateless Session Bean EJB Container Stateless Session Bean method Stateless Session Bean methods Bean Instance Stateful Session Bean Stateless Session Bean Stateful Session Bean J2EE Server Stateful Session Bean Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 9 Collection Collections Collection Set List Collections 10 s1 s1 1 short s1 1 s1 1 short s1 1 s1 s1 1 s1 1 int short s1 1 s1 1 26 Math round 11 5 Math round 11 5 Math round 11 5 12 Math round 11 5 11 round 1 2 floor 27 String s new String xyz String Object 28 4 j 1 j 1 j public class ThreadTest1 private int j public static void main String args ThreadTest1 tt new ThreadTest1 Inc inc tt new Inc Dec dec tt new Dec for int i 0 i 2 i Thread t new Thread inc Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m t start t new Thread dec t start private synchronized void inc j System out println Thread currentThread getName inc j private synchronized void dec j System out println Thread currentThread getName dec j class Inc implements Runnable public void run for int i 0 i 100 i inc class Dec implements Runnable public void run for int i 0 i 100 i dec 29 Java goto java java 30 run start start JVM run Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 31 EJB SessionBean EntityBean SessionBean Stateless Session Bean Bean EJB Bean Stateful Session Bean Bean Stateful Session Bean Bean EntityBean Entity Beans Entity beans EJB Entity beans Entity Beans Beans EJB OMG OTS Sun Microsystems Transaction Service JTS Java Transaction API JTA X Open XA 32 BEA WebLogic Server IBM WebSphere Application Server Oracle9i Application Server jBoss Tomcat 33 runtime exception ArithmeticException ArrayStoreException BufferOverflowException BufferUnderflowException CannotRedoException CannotUndoException ClassCastException CMMException ConcurrentModificationException DOMException EmptyStackException IllegalArgumentException IllegalMonitorStateException IllegalPathStateException IllegalStateException ImagingOpException IndexOutOfBoundsException MissingResourceException NegativeArraySizeException NoSuchElementException NullPointerException ProfileDataException ProviderException RasterFormatException SecurityException SystemException UndeclaredThrowableException UnmodifiableSetException UnsupportedOperationException 34 implements concrete class implements 35 List Set Map Collection List Set Map 36 J2EE 37 abstract method static native synchronized Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 38 length String length length length String length 39 Set equals Set iterator Equals Set Equals equals 40 Constructor override Constructor Overriding Overloading 41 String String final 42 swtich byte long String Switch expr1 expr1 switch case int short char byte Long string swtich 43 try return try finally code return return 44 2 8 2 0 i System out println ii i 2 1011 Package test format import java text NumberFormat import java util HashMap public class SimpleMoneyFormat public static final String EMPTY public static final String ZERO public static final String ONE public static final String TWO public static final String THREE public static final String FOUR public static final String FIVE public static final String SIX public static final String SEVEN public static final String EIGHT public static final String NINE public static final String TEN public static final String HUNDRED public static final String THOUSAND public static final String TEN THOUSAND public static final String HUNDRED MILLION public static final String YUAN Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m public static final String JIAO public static final String FEN public static final String DOT private static SimpleMoneyFormat formatter null private HashMap chineseNumberMap new HashMap private HashMap chineseMoneyPattern new HashMap private NumberFormat numberFormat NumberFormat getInstance private SimpleMoneyFormat numberFormat setMaximumFractionDigits 4 numberFormat setMinimumFractionDigits 2 numberFormat setGroupingUsed false chineseNumberMap put 0 ZERO chineseNumberMap put 1 ONE chineseNumberMap put 2 TWO chineseNumberMap put 3 THREE chineseNumberMap put 4 FOUR chineseNumberMap put 5 FIVE chineseNumberMap put 6 SIX chineseNumberMap put 7 SEVEN chineseNumberMap put 8 EIGHT chineseNumberMap put 9 NINE chineseNumberMap put DOT DOT chineseMoneyPattern put 1 TEN chineseMoneyPattern put 2 HUNDRED chineseMoneyPattern put 3 THOUSAND chineseMoneyPattern put 4 TEN THOUSAND chineseMoneyPattern put 5 TEN chineseMoneyPattern put 6 HUNDRED chineseMoneyPattern put 7 THOUSAND Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m chineseMoneyPattern put 8 HUNDRED MILLION public static SimpleMoneyFormat getInstance if formatter null formatter new SimpleMoneyFormat return formatter public String format String moneyStr checkPrecision moneyStr String result result convertToChineseNumber moneyStr result addUnitsToChineseMoneyString result return result public String format double moneyDouble return format numberFormat format moneyDouble public String format int moneyInt return format numberFormat format moneyInt public String format long moneyLong return format numberFormat format moneyLong public String format Number moneyNum return format numberFormat format moneyNum Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m private String convertToChineseNumber String moneyStr String result StringBuffer cMoneyStringBuffer new StringBuffer for int I 0 I 0 i cMoneyStringBuffer insert I chineseMoneyPattern get EMPTY moneyPatternCursor moneyPatternCursor moneyPatternCursor 8 1 moneyPatternCursor 1 String fractionPart cMoneyStringBuffer substring cMoneyStringBuffer indexOf cMoneyStringBuffer delete cMoneyStringBuffer indexOf cMoneyStringBuffer length while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf 2 ZERO while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf 2 ZERO while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf 2 ZERO while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf 2 TEN THOUSAND while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 2 HUNDRED MILLION while cMoneyStringBuffer indexOf 1 cMoneyStringBuffer replace cMoneyStringBuffer indexOf cMoneyStringBuffer indexOf 2 ZERO if cMoneyStringBuffer lastIndexOf ZERO cMoneyStringBuffer length 1 cMoneyStringBuffer delete cMoneyStringBuffer length 1 cMoneyStringBuffer length cMoneyStringBuffer append fractionPart result cMoneyStringBuffer toString return result private String addUnitsToChineseMoneyString String moneyStr String result StringBuffer cMoneyStringBuffer new StringBuffer moneyStr int indexOfDot cMoneyStringBuffer indexOf DOT cMoneyStringBuffer replace indexOfDot indexOfDot 1 YUAN 1 C char str1 abc char str2 abc const char str3 abc const char str4 abc const char str5 abc const char str6 abc cout boolalpha str1 str2 endl Cout boolalpha str3 str4 endl Cout boolalpha str5 str6 endl Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m 13 C A B B A C a class B public A B A b class B operator A B A c class A A const B A non explicit B d A 12 sizeof C void UpperCase char str str for size t i 0 i if a str i char str aBcDe cout str sizeof str sizeof str 0 endl UpperCase str cout str 9 ch A 9 1 char cl c 0 x10 0 if cl 9 cl A 9 1 cout ch cl char str I love for size t i 0 i char2Hex str i cout endl 4 C struct Test Test int Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Test void fun void main void Test a 1 a fun Test b b fun 5 C cout true 1 1 temp unsigned int const size2 temp char str2 size2 9 0 C struct CLS int m i CLS int I m i i CLS CLS 0 CLS obj Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m cout obj m i endl 10 C C class Empty public Empty Empty const Empty Empty Empty Empty operator const Empty operator const 3 C float a 1 0f cout int a endl cout int cout boolalpha int a int Float b 0 0f cout int b endl cout int cout boolalpha int b int I array cout array i psrc i 1 I pdest i psrc i else for size t i 0 i pdest i psrc i return dest int main void Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m char str 0123456789 mymemcpy str 1 str 0 9 cout str endl system Pause return 0 C net Net Net Google 21 GOOGLE Google Java c c J2EE Java Java Java Java J2EE Java c c Java IT IT Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Click to buy NOW P D F X C H A N G E w w w d o c u t r a c k c o m Tags JAVA JAVA JAVA C C C J2EE J2EE Java float 14 0 98086 23 59 59 jer08 Says 2008 03 12 10 50 Java wh Says 2007 11 30 11 06 43517 NetFetch Says 2007 10 29 21 58 Java 1 2 Says 2007 10 27 20 20 57jx55 Says 20

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论