preface

Many friends do not know enough about the interview, do not know how to prepare, do not know enough about the setting and purpose of the interview, so the success rate is not high. Under normal circumstances, the success rate of school recruitment interview is less than 1%, and the success rate of social recruitment interview is less than 5%, so candidates must know the purpose of setting up the interview and the significance of each link, targeted…

Through the on-site analysis of JD of the Internet, the interviewees can master and analyze the company’s technical requirements and positioning, and then know whether they are suitable for the position and how to prepare. In order to improve the success rate of the interview, we must understand the business of the company, analyze the site corresponding to the business of the company, understand the technology stack they use, and then prepare relevant knowledge. The last section is about self-introduction, most interview failure is caused by the resume and self-introduction, but most people do not know it. .



The second/third side focuses more on the depth and breadth of Java knowledge to investigate, this link is no longer limited to the basic knowledge, more is the underlying source code, project combat and so on.

Foundation and Framework

1. Can the String class be inherited and why

2. What is the difference between String, Stringbuffer, StringBuilder?

3. What is the difference between ArrayList and LinkedList

4. Class instantiation order, such as superclass static data, constructors, fields, subclass static data, constructors, fields, their execution order

Is HashMap thread safe? What are the maps used concurrently? What are their internal principles, such as Hashcode, expansion, etc

6. Why is HashMap get and set so fast, and why concurrentHashMap improves concurrency

7. The difference between abstract classes and interfaces, can a class inherit multiple classes, can an interface inherit multiple interfaces, can a class implement multiple interfaces

8. When can stack memory overflow occur

9. What is NIO, principle

10. In reflection, class. forName is different from ClassLoader

11. Tomcat structure, class loader flow

12. Talk about the propagation properties of Spring transactions,AOP principles, the difference between dynamic proxies and Cglib implementations, and how AOP can be implemented

13.Spring’s beanFactory and factoryBean

14.Spring loading process

15. How does Spring manage transactions



multithreading

1. What determines the maximum number of threads in a line city

2. Several ways to implement multithreading, what is thread safety, what is reordering

3. How volatile can replace locking

4. The difference between sleep and Wait and the implementation principle of Wait

5. The difference between Lock and synchronized, the principle of synchronized, what is spin Lock, bias Lock, lightweight Lock, what is reentrant Lock, what is fair Lock and unfair Lock

6. Which atomic classes have been used, what are their parameters and principles

7. Which thread pools have been used, their principle is briefly summarized, the meaning of each constructor parameter, such as coreSize, maxsize, etc

8. There is a third party interface, there are many threads to call the data, now specify a maximum of 10 threads per second to call it at the same time, how to do.

9. Is the Spring controller singleton or multi-instance? How to ensure the security of concurrency

10. Print the letters ABC in a three-thread loop, such as abcabcabc

11. Have you used ThreadLocal before? How does it work

12. If you were asked to implement a concurrency safe linked list, what would you do

The JVM related

1. What is a complete GC flow in the JVM (from YGC to FGC), focusing on how objects are promoted to older generations, the main JVM parameters, etc.

2. Do you know which types of garbage collectors, their advantages and disadvantages, focusing on CMS

3. When there is an overflow of memory, how do you make errors

4. How much do you know about the JVM memory model

5. Tell me briefly what you know about classloaders

6. Reflection in JAVA

network

1. What is the difference between HTTP1.0 and HTTP1.1

2.TCP three-way handshake and four-way wave. Why does it take four times to disconnect

3. Difference between TIME_WAIT and CLOSE_WAIT

4. Describe some HTTP response codes you know

5. What steps does the computer take when you open a link with your browser

6. There are several IO models in Linux, what are their meanings

7. How does TCP/IP ensure reliability and what data packets are composed of

Architectural design and distribution

1. How to tune Tomcat and what are the meanings of various parameters

2. What are the common cache strategies? What is the cache system used in your project? How is it designed

3. How to prevent cache avalanche

4. Implement an LRU in Java

5. How to achieve a unique SEQUENCE number in a distributed cluster

6. Design a second kill system that automatically closes transactions if no payment is made in 30 minutes

7. How to make a distributed lock

8. What MQ has been used, how has it been used, what are its advantages and disadvantages compared to other MQ, and are MQ connections thread-safe

9. How can THE data of MQ system be guaranteed against loss

10. Principle of distributed transaction, how to use distributed transaction

11. What is a consistent hash

12. What is restful? Tell me what you understand restful

13. How to design and maintain 100W long connection?

14. Explain what the MESI protocol is (Cache consistency)

15. Tell me how many HASH algorithms you know, even simple ones

16. What is paxOS algorithm

17. Memory management differences between Redis and memcached

18. In an online document system, documents can be edited. How to prevent multiple people from editing and updating the same document at the same time

algorithm

Find the smallest 10 numbers in a billion

2. There are 100 million numbers, 2 of which are repeated. Find it quickly, and optimize time and space

320 million randomly generated unordered integers to find the value of the middle size

4. Traverse the binary tree

The database

1. What are the database isolation levels, what are their meanings, what is the default isolation level of MYsql, and the advantages and disadvantages of each storage engine

2. How to safely modify the same row of data under high concurrency, what are optimistic locks and pessimistic locks, what are the two types of INNODB row-level locks, and explain their meanings

3. What are the general steps of SQL optimization, how to see the execution plan, how to understand the meaning of each field, the principle of index?

Mysql > select * from ‘mysql’; mysql > select * from ‘mysql’

5.MYsql index implementation

6. Differences between clustered and non-clustered indexes

7. Difference between BTREE and B+ Tree in the database

Personally, I think the interview is also like a brand new journey, failure and victory are common. Therefore, I advise you not to lose heart and morale because of the failure of the interview. Don’t be complacent because you passed the interview, you will be a better future, continue to work hard!





The 2019 Java Interview questions have been compiled into more than 1000 pages and more than 400 pages of PDF documents
Gongchong Hao [Programmer Chasing wind], the articles will be updated in it, and the sorted data will be placed in it.

For the above interview asked knowledge I summarizes the Internet company’s Java programmer interview involves most of the interview questions and answers into a document and architecture data Shared with everybody, hope I can help to you and find a good job of before the interview, also save you search for information on the Internet to learn.



The last

Welcome everyone to exchange together, it is not easy to sort out the information, I hope that the article remember to pay attention to my thumbs up, thank you for your support!