Java interview question summary and java question Summary

Source: Internet
Author: User

Java interview question summary and java question Summary
1) What design patterns have you used? One by hand (except for a singleton); the factory mode, the facade mode (like the service layer); the proxy Mode 2) What is the core of springmvc, how is the request process handled and how is the reversal implemented? 1. The user sends the request to the front-end controller DispatcherServlet 2. The DispatcherServlet receives the request and calls the HandlerMapping processor 3. The processor (filter) if DispatcherServlet is returned for processing, if not, page 4 is returned. DispatcherServlet calls handlerAdapter processor 5 and the handlerAdapter adapter (controller) backend processor 6. After the controller completes processing, return your modelView 7, hendlerAdapter returns the result returned by the controller to DispatcherServlet 8, DispatcherSer Vlet sends modelAndView to viewReslover 9. ViewReslover parses and returns the specific view 10. DispatcherServlet responds to the user. 3) What is the aop principle in spring? IOC (Reverse Control ): assign control to member variables from code to configuration file; AOP: Aspect (Aspect) Oriented (for) Programming (Programming), for Aspect Programming 4) differences between cookie and session, how to save the user status in a distributed environment; 1. The cookie is saved on the client and the session is saved on the server. 2. cookie stores strings and session stores objects. 5) code for Stack Overflow and stack overflow; int num = 0 private void softMothod () {num ++; this. softMothod ();} private void list () {List lis = new ArrayList (); while (true) {list. add (5*1024*1024)} 6) can ThreadLocal be used to share data? It cannot be shared, and the thread is exclusive. Each thread has a backup. 7) mysql statement optimization, what tool is used; 7) mysql statement optimization, what tool is used; use tool: profiling1 to enable the profile parameter: set profiling = 1; 2, run Query: select count (*) from t_test3, view the system profile record: show profiles; 4, View Details: show profile cpu, block io for query 6 use tool: profiling1, enable the profile parameter: set profiling = 1; 2. Run Query: select count (*) from t_test3 to view the system profile record: show profiles; 4. View Details: show profile cpu, block io for query 6

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.