java-面试题(英文版)

上传人:xgs****56 文档编号:10412324 上传时间:2020-04-11 格式:DOC 页数:581 大小:4.99MB
返回 下载 相关 举报
java-面试题(英文版)_第1页
第1页 / 共581页
java-面试题(英文版)_第2页
第2页 / 共581页
java-面试题(英文版)_第3页
第3页 / 共581页
点击查看更多>>
资源描述
1Learn Java/J2EE core concepts and key areasWithJava/J2EE Job Interview CompanionByK.Arulkumaran&A.SivayiniTechnical ReviewersCraig MaloneStuart WatsonArulazi DhesiaseelanLara DAlbreoCover Design, Layout, & EditingA.SivayiniAcknowledgementsA. SivayiniMr. & Mrs. R. Kumaraswamipillai2Java/J2EEJob Interview CompanionCopy Right 2005-2007 ISBN 978-1-4116-6824-9The author has made every effort in the preparation of this book to ensure the accuracy of the information. However,information in this book is sold without warranty either expressed or implied. The author will not be held liable for anydamages caused or alleged to be caused either directly or indirectly by this book.Please e-mail feedback & corrections (technical, grammatical and/or spelling) tojava-interviewhotmail.comFirst Edition (220+ Q&A): Dec 2005Second Edition (400+ Q&A): March 20073OutlineSECTION DESCRIPTIONWhat this book will do for you?Motivation for this bookKey Areas indexSECTION 1 Interview questions and answers on:Java Fundamentals Swing Applet Performance and Memory issues Personal and Behavioral/Situational Behaving right in an interview Key PointsSECTION 2 Interview questions and answers on:Enterprise Java J2EE Overview Servlet JSP JDBC / JTA JNDI / LDAP RMI EJB JMS XML SQL, Database, and O/R mapping RUP & UML Struts Web and Application servers. Best practices and performance considerations. Testing and deployment. Personal and Behavioral/Situational Key PointsSECTION 3 Putting it all together section.How would you go about?1. How would you go about documenting your Java/J2EE application?2. How would you go about designing a Java/J2EE application?3. How would you go about identifying performance problems and/or memory leaks in your Javaapplication?4. How would you go about minimizing memory leaks in your Java/J2EE application?5. How would you go about improving performance of your Java/J2EE application?6. How would you go about identifying any potential thread-safety issues in your Java/J2EEapplication?7. How would you go about identifying any potential transactional issues in your Java/J2EE4application?8. How would you go about applying the Object Oriented (OO) design concepts in your Java/J2EEapplication?9. How would you go about applying the UML diagrams in your Java/J2EE project?10. How would you go about describing the software development processes you are familiar with?11. How would you go about applying the design patterns in your Java/J2EE application?12. How would you go about designing a Web application where the business tier is on a separatemachine from the presentation tier. The business tier should talk to 2 different databases and yourdesign should point out the different design patterns?13. How would you go about determining the enterprise security requirements for your Java/J2EEapplication?14. How would you go about describing the open source projects like JUnit (unit testing), Ant (buildtool), CVS (version control system) and log4J (logging tool) which are integral part of mostJava/J2EE projects?15. How would you go about describing Service Oriented Architecture (SOA) and Web services?SECTION 4 Emerging Technologies/Frameworks Test Driven Development (TDD). Aspect Oriented Programming (AOP). Inversion of Control (IoC) (Also known as Dependency Injection). Annotations or attributes based programming (xdoclet etc). Spring framework. Hibernate framework. EJB 3.0. JavaServer Faces (JSF) framework.SECTION 5 Sample interview questions Java Web Components Enterprise Design GeneralGLOSSARY OF TERMSRESOURCESINDEX5Table of contentsOutline_ 3Table of contents _ 5What this book will do for you? _ 7Motivation for this book _ 8Key Areas Index _ 11Java Interview questions & answers _ 13Java Fundamentals _ 14Java Swing _ 69Java Applet_ 76Java Performance and Memory issues _ 78Java Personal and Behavioral/Situational _ 83Java Behaving right in an interview_ 89Java Key Points _ 91Enterprise Java Interview questions & answers _ 94Enterprise - J2EE Overview_ 95Enterprise - Servlet_ 108Enterprise - JSP _ 126Enterprise JDBC & JTA_ 145Enterprise JNDI & LDAP _ 155Enterprise - RMI _ 159Enterprise EJB 2.x _ 163Enterprise - JMS _ 180Enterprise - XML _ 190Enterprise SQL, Database, and O/R mapping_ 197Enterprise - RUP & UML_ 206Enterprise - Struts_ 214Enterprise - Web and Application servers _ 218Enterprise - Best practices and performance considerations _ 222Enterprise Logging, testing and deployment _ 225Enterprise Personal and Behavioral/Situational_ 228Enterprise Software development process_ 230Enterprise Key Points _ 233How would you go about?_ 238Q 01: How would you go about documenting your Java/J2EE application? FAQ_ 239Q 02: How would you go about designing a Java/J2EE application? FAQ _ 240Q 03: How would you go about identifying performance and/or memory issues in your Java/J2EE application? FAQ_ 243Q 04: How would you go about minimizing memory leaks in your Java/J2EE application? FAQ _ 244Q 05: How would you go about improving performance in your Java/J2EE application? FAQ_ 244Q 06: How would you go about identifying any potential thread-safety issues in your Java/J2EE application? FAQ _ 245Q 07: How would you go about identifying any potential transactional issues in your Java/J2EE application? FAQ _ 2466Q 08: How would you go about applying the Object Oriented (OO) design concepts in your Java/J2EE application? FAQ247Q 09: How would you go about applying the UML diagrams in your Java/J2EE project? FAQ _249Q 10: How would you go about describing the software development processes you are familiar with? FAQ _251Q 11: How would you go about applying the design patterns in your Java/J2EE application? _253Q 12: How would you go about designing a Web application where the business tier is on a separate machine from thepresentation tier. The business tier should talk to 2 different databases and your design should point out the differentdesign patterns? FAQ_286Q 13: How would you go about determining the enterprise security requirements for your Java/J2EE application? _287Q 14: How would you go about describing the open source projects like JUnit (unit testing), Ant (build tool), CVS(version control system) and log4J (logging tool) which are integral part of most Java/J2EE projects? _292Q 15: How would you go about describing Service Oriented Architecture (SOA) and Web services? FAQ_299Emerging Technologies/Frameworks _311Q 01: What is Test Driven Development (TDD)? FAQ _312Q 02: What is the point of Test Driven Development (TDD)? What do you think of TDD?_313Q 03: What is aspect oriented programming (AOP)? Do you have any experience with AOP? _313Q 04: What are the differences between OOP and AOP? _317Q 05: What are the benefits of AOP?_317Q 06: What is attribute or annotation oriented programming? FAQ _317Q 07: What are the pros and cons of annotations over XML based deployment descriptors? FAQ _318Q 08: What is XDoclet? _319Q 09: What is inversion of control (IoC) (also known more specifically as dependency injection)? FAQ_319Q 10: What are the different types of dependency injections? FAQ _321Q 11: What are the benefits of IoC (aka Dependency Injection)? FAQ _322Q 12: What is the difference between a service locator pattern and an inversion of control pattern? _323Q 13: Why dependency injection is more elegant than a JNDI lookup to decouple client and the service?_323Q 14: Explain Object-to-Relational (O/R) mapping? _323Q 15: Give an overview of hibernate framework? FAQ _324Q 16: Explain some of the pitfalls of Hibernate and explain how to avoid them? Give some tips on Hibernate bestpractices? FAQ_333Q 17: Give an overview of the Spring framework? What are the benefits of Spring framework? FAQ_334Q 18: How would EJB 3.0 simplify your Java development compared to EJB 1.x, 2.x ? FAQ _337Q 19: Briefly explain key features of the JavaServer Faces (JSF) framework? _339Q 20: How would the JSF framework compare with the Struts framework? How would a Spring MVC framework comparewith Struts framework?_341Sample interview questions_344Java_345Web components_345Enterprise_345Design_347General _347GLOSSARY OF TERMS_348RESOURCES _350INDEX _3527What this book will do for you?Have you got the time to read 10 or more books and articles to add value prior to the interview? This book has beenwritten mainly from the perspective of Java/J2EE job seekers and interviewers. There are numerous books and articleson the market covering specific topics like Java, J2EE, EJB, Design Patterns, ANT, CVS, Multi-Threading, Servlets, JSP,emerging technologies like AOP (Aspect Oriented Programming), Test Driven Development (TDD), Dependency InjectionDl (aka IoC Inversion of Control) etc. But from an interview perspective it is not possible to brush up on all these bookswhere each book usually has from 300 pages to 600 pages. The basic purpose of this book is to cover all the coreconcepts and key areas, which all Java/J2EE developers, designers and architects should be conversant with to performwell in their current jobs and to launch a successful career by doing well at interviews. The interviewer can also use thisbook to make sure that they hire the right candidate depending on their requirements. This book contains a wide range oftopics relating to Java/J2EE development in a concise manner supplemented with diagrams, tables, sample codes andexamples. This book is also appropriately categorized to enable you to choose the area of interest to you.This book will assist all Java/J2EE practitioners to become better at what they do. Usually it takes years to understand allthe core concepts and key areas when you rely only on your work experience. The best way to fast track this is to readappropriate technical information and proactively apply these in your work environment. It worked for me and hopefully itwill work for you as well. I was also at one stage undecided whether to name this book “Java/J2EE core concepts andkey areas” or “Java/J2EE Job Interview Companion”. The reason I chose “Java/J2EE Job Interview Companion” isbecause the core concepts and key areas discussed in this book helped me to be successful in my interviews, helped meto survive and succeed at my work regardless what my job (junior developer, senior developer, technical lead, designer,contractor etc) was and also gave me thumbs up in code reviews. This book also has been set out as a handy referenceguide and a roadmap for building enterprise Java applications.8Motivation for this bookI started using Java in 1999 when I was working as a junior developer. During those two years as a permanent employee,I pro-actively spent many hours studying the core concepts behind Java/J2EE in addition to my hands on practicalexperience. Two years later I decided to start contracting. Since I started contracting in 2001, my career had a muchneededboost in terms of contract rates, job satisfaction, responsibility etc. I moved from one contract to another with aview of expanding my skills and increasing my contract rates.In the last 5 years of contracting, I have worked for 5 different organizations both medium and large on 8 differentprojects. For each contract I held, on average I attended 6-8 interviews with different companies. In most cases multiplejob offers were made and consequently I was in a position to negotiate my contract rates and also to choose the job Iliked based on the type of project, type of organization, technology used, etc. I have also sat for around 10 technical testsand a few preliminary phone interviews.The success in the interviews did not come easily. I spent hours prior to each set of interviews wading through variousbooks and articles as a preparation. The motivation for this book was to collate all this information into a single book,which will save me time prior to my interviews but also can benefit others in their interviews. What is in this book hashelped me to go from just a Java/J2EE job to a career in Java/J2EE in a short time. It has also given me the jobsecurity that I can find a contract/permanent job opportunity even in the difficult job market.I am not suggesting that every one should go contracting but by performing well at the interviews you can be in a positionto pick the permanent role you like and also be able to negotiate your salary package. Those of you who are already ingood jobs can impress your team leaders, solution designers and/or architects for a possible promotion by demonstratingyour understanding of the key areas discussed in this book. You can discuss with your senior team members aboutperformance issues, transactional issues, threading issues (concurrency issues) and memory issues. In most ofmy previous contracts I was in a position to impress my team leads and architects by pinpointing some of the criticalperformance, memory, transactional and threading issues with the code and subsequently fixing them. Trust me it is nothard to impress someone if you understand the key areas.For example: Struts action classes are not thread-safe (Refer Q113 in Enterprise section). JSP variable declaration is not thread-safe (Refer Q34 in Enterprise section). Valuable resources like database connections should be closed properly to avoid any memory and performanceissues (Refer Q45 in Enterprise section). Throwing an application exception will not rollback the transaction in EJB. (Refer Q77 in Enterprise section).The other key areas, which are vital to any software development, are a good understanding of some of key designconcepts, design patterns, and a modeling language like UML. These key areas are really worthy of a mention in yourresume and interviews.For example: Know how to use inheritance, polymorphism and encapsulation (Refer Q7, Q8, Q9, and Q10 in Java section.). Why use design patterns? (Refer Q5 in Enterprise section). Why is UML important? (Refer Q106 in Enterprise section).If you happen to be in an interview with an organization facing serious issues with regards to their Java applicationrelating to memory leaks, performance problems or a crashing JVM etc then you are likely to be asked questions onthese topics. Refer Q72 Q74 in Java section and Q123, Q125 in Enterprise section.If you happen to be in an interview with an organization which is working on a pilot project using a different developmentmethodology like agile methodology etc or has just started adopting a newer development process or methodologythen you are likely to be asked questions on this key area.If the team lead/architect of the organization you are being interviewed for feels that the current team is lacking skills inthe key areas of design concepts and design patterns then you are likely to be asked questions on these key areas.9Another good reason why these key areas like transactional issues, design concepts, design patterns etc are vital arebecause solution designers, architects, team leads, and/or senior developers are u
展开阅读全文
相关资源
相关搜索

当前位置:首页 > 办公文档 > 解决方案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!