Java Backstage Interview __java

Source: Internet
Author: User
1. There are several different ways to create threads. Which one do you like?     Why. 3 Kinds: Inherit thread class, implement Runnable interface, realize runnable interface of callable interface; Because this does not need to inherit the thread class. In the case where other objects have been inherited in the application design, this requires multiple inheritance (and Java does not support multiple inheritance) and can only implement interfaces. At the same time, the thread pool is very efficient and easy to implement and use.
2, string and stringbuffer,stringbuild what is different, why not to be longer, or can become longer. Answer: String length is not variable

the bottom of the StringBuffer object is also an char[] array, But there is no final modification, so the value of the array is variable.

3, SQL language optimization, SQL injection, how precompilation is implemented, and why SQL injection can be prevented. 4, reflection, reflection how to achieve, reflection has what effect. 5, how to implement dynamic proxy, spring dynamic agent and native spring dynamic proxy. 6, the difference between dynamic agent and reflection. 7, what the thread pool, the use of what threads pools. How to achieve. 8, how spring implements the injection (reflection and dynamic proxies, IOC and AOP). 9, HashMap is not thread-safe, why, the bottom how to achieve. 10, Spring and jfinal the same and different places. 11, HTTP IP Protocol, TCP protocol, three handshake, four wave 12, the role of the project, role, the use of technology stack 13, you encounter the greatest difficulties in what. How to solve.         A: Do not dare to try, courage, dare to try to bite the bullet to do

1, System.out.println () in the System, Out, println () are what each represents.     Answer: System is a class inside the Java.lang
             Out is a data member (also known as a field) in system, but it is not a basic class, but an object of the Java.io.PrintStream class
             PRINTLN () is a method in the Java.io.PrintStream class that is used to


of the console output information.

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.