Three years of Jingdong senior architect finishing sharing: java interview core knowledge points principle document

Preface

This article is a summary of the essential knowledge points for Java programmers interviews. It explains in detail the principles of JVM, multithreading, data structures and algorithms, distributed caching, design patterns, etc. I hope that readers can learn the basic principles of Java by reading this book A deeper and comprehensive understanding.

Interviewers usually have a comprehensive understanding of the interviewer’s knowledge structure in just two hours. If the interviewer is procrastinated and cannot directly address the nature of the question when answering questions, it will be difficult for the interviewer to fully express himself and ultimately affect the interview results. In response to this situation, this article will not be sloppy when explaining the knowledge points, and strive to be concise. It introduces in detail the core knowledge points that Java programmers are often asked during interviews.

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

This article will introduce the contents of three parts: the table of contents, the main content and the suggestions for readers to read this article. I hope you will like it, and I hope it can help you learn!

table of Contents

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

main content

This article consists of 9 chapters, and the contents of each chapter are as follows.

Chapter 1 explains the principles of JVM, involving JVM operating mechanism, JVM memory model, common garbage collection algorithms and JVM class loading mechanism.

1.1 The operating mechanism of JVM

1.2 Multithreading

1.3 JVM memory area

1.4 JVM runtime memory

1.5 Garbage Collection and Algorithms

1.6 Four types of references in Java

1.7 Generational collection algorithm and partition collection algorithm

1.8 Garbage collector

1.9 Java network programming model

1.10 JVM class loading mechanism

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 2, this chapter will introduce the basic knowledge of common Java in detail, including Java collections, exception classification and handling, reflection mechanism, annotations, internal classes, generics, and serialization.

2.1 Collection

2.2 Abnormal classification and treatment

2.3 Reflection mechanism

2.4 Annotation

2.5 internal class

2.6 Generics

2.7 serialization

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Compared with the traditional single thread in Chapter 3, multithreading can make better use of the server's multiple CPU resources on the basis of the multi-core configuration of the operating system, making the program run more efficiently. Java provides support for multiple threads to execute multiple threads concurrently in a process, and each thread executes different tasks in parallel to meet the requirements of writing highly efficient programs.

3.1 How to create a Java thread

3.2 How the thread pool works

3.3 5 commonly used thread pools

3.4 Thread life cycle

3.5 Basic method of thread

3.6 Locks in Java

3.7 Thread context switching

3.8 Java blocking queue

3.9 Java Concurrency Keywords

3.10 How do multiple threads share data

3.11 ConcurrentHashMap concurrency

3.12 Thread scheduling in Java

3.13 Process scheduling algorithm

3.14 What is CAS

3.15 ABA problem

3.16 What is AQS

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 4 Data Structure refers to the storage and organization of data. Some people think that "program = data structure + algorithm". Therefore, a good data structure is very important to the operation of the program, especially in a complex system. Designing an excellent data structure can improve the flexibility and performance of the system. In the process of program design and development, it is inevitable that various data structures need to be used. For example, sometimes you need to define your own data structure according to the characteristics of the product, so the data structure is very important to the program design. This chapter will introduce the commonly used data structures in detail, including stacks, queues, linked lists, binary trees, red-black trees, hash tables, and bitmaps.

4.1 Stack and its Java implementation

4.2 Queue and its Java implementation

4.3 Linked List

4.4 hash table

4.5 Binary Sort Tree

4.6 Red-Black Tree

4.7 Figure

4.8 Bitmap

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 5 "data structure + algorithm = program" in the computer world, so algorithms play a vital role in program development. Although there are not many cases in which we design our own algorithms in development, we cannot do without algorithms in our work. Whether it is the algorithm provided by the development kit or the algorithm designed by ourselves, the algorithm is ubiquitous in the program.

Commonly used algorithms are search algorithms and sorting algorithms. The search algorithms include linear search algorithm, depth first search algorithm, breadth first search algorithm and binary search algorithm. Here we focus on the most commonly used and fastest binary search algorithm.

Sorting algorithm is a very common algorithm, ranging from database design to small list sorting. Commonly used sorting algorithms are bubble sorting algorithm, insertion sorting algorithm, quick sorting algorithm, Hill sorting algorithm, merge sorting algorithm, bucket sorting algorithm, heap sorting algorithm and radix sorting algorithm. This chapter will introduce these algorithms in detail.

In addition, some algorithms that are indispensable in applications will also be introduced, such as pruning algorithm, backtracking algorithm, shortest path algorithm, maximum sub-array algorithm and longest common factor algorithm.

5.1 Binary search algorithm

5.2 Bubble sort algorithm

5.3 Insertion sort algorithm

5.4 Quick sort algorithm

5.5 Hill sorting algorithm

5.6 Merge Sort Algorithm

5.7 Bucket Sorting Algorithm

5.8 Radix Sort Algorithm

5.9 Other algorithms

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 6 In the computer field, the network is a virtual platform for information transmission, reception, and sharing, linking various points, areas, and bodies of information together, so as to realize the sharing of these resources. In a large-scale distributed system, the network plays a vital role. This chapter briefly introduces the commonly used 7-layer network architecture, as well as the principles of TCP/IP, HTTP, and CDN. This is what we must understand to build a distributed system Only by understanding these principles can we design a good system and optimize the system architecture more specifically.

Load balancing is based on the existing network structure, providing a cheap, effective, and transparent method to expand the bandwidth of network equipment and servers, increase throughput, strengthen network data processing capabilities, and improve network flexibility And availability. Commonly used load balancing in the project includes four-layer load balancing and seven-layer load balancing.

This chapter explains the principles of network and load balancing, involving TCP/IP, HTTP, commonly used load balancing algorithms, and LVS principles.

6.1 Network

6.2 Load balancing

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 7 Database is an indispensable component in software development. Whether it is relational database MySQL, Oracle, PostgreSQL, or NoSQL database HBase, MongoDB, Cassandra, it solves different problems for different application scenarios. This chapter will not introduce the use of these databases in detail, because readers have used these databases more or less, but the underlying principles of the database, especially the storage engine, database locks, and distributed transactions, are easy to overlook, and these principles are for the database Tuning and solving difficult problems are more important, so this chapter will introduce database storage engines, database indexes, stored procedures, database locks, and distributed transactions. I hope readers can understand these principles at a higher level in order to Make correct judgments when there is a performance bottleneck in the database.

7.1 Basic concepts and principles of database

7.2 Concurrent operations and locks of the database

7.3 Database Distributed Transaction

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 8 Caching refers to a technology that stores frequently accessed data in memory to speed up user access. Cache is divided into process-level cache and distributed cache. Process-level cache refers to the storage of data in the service and realizes storage through Map, List and other structures; distributed cache refers to the separate storage of cached data in a distributed system to facilitate the unified cache Management and access. Commonly used distributed cache systems are Ehcache, Redis and Memcached.

8.1 Introduction to Distributed Cache

8.2 Principle and Application of Ehcache

8.3 Principle and Application of Redis

8.4 The core problem of distributed cache design

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

Chapter 9 Design Pattern is a summary of highly abstracted code design experience that can be used repeatedly in programming.

The correct use of design patterns can effectively improve the readability, reusability and reliability of the code. Writing code that conforms to the design pattern specifications is not only beneficial to the stability and reliability of the own system, but also to the connection of external systems. In system engineering that uses good design patterns, it is of great help whether it is to meet current needs or adapt to future needs, whether it is the docking of modules between its own systems or the docking of external systems. .

This chapter explains design patterns, involving 23 common classic design patterns.

9.4 The concept of singleton mode and its implementation in Java

9.5 The concept of builder pattern and its implementation in Java

9.6 The concept of prototype mode and its implementation in Java

9.7 Concept of Adapter Mode and Java Implementation

9.8 The concept of decorator pattern and its implementation in Java

9.9 The concept of proxy mode and its implementation in Java

9.10 The concept of appearance mode and its implementation in Java

The concept of 9.11 bridge mode and its implementation in Java

9.12 Concept of Combination Mode and Java Implementation

9.13 The concept of Flyweight mode and its implementation in Java

9.14 Concept of Strategy Pattern and Java Implementation

9.15 Concept of Template Method Pattern and Java Implementation

9.16 Concept of Observer Pattern and Java Implementation

9.17 Concept and Java implementation of iterator pattern

9.18 The concept of the chain of responsibility model and its implementation in Java

9.19 The concept of command mode and its implementation in Java

9.20 The concept of memo mode and its implementation in Java

9.21 The concept of state mode and its implementation in Java

9.22 The concept of visitor pattern and its implementation in Java

9.23 The concept of the mediator pattern and its implementation in Java

9.24 Concept of Interpreter Pattern and Java Implementation

Ali senior architect three years of finishing and sharing: java interview core knowledge points principle document

 

This [offer is here: Java Interview Core Knowledge Principles] has 364 pages, friends who need the full version, can like + follow, add a small assistant VX: mxx2020666, get it for free

Suggestions for readers to read this article

The article catalog is meticulous, and readers are advised to use the catalog as a reference to review the past and learn the new after reading this article, so as to achieve the purpose of understanding.

It is recommended that readers spend 3 weeks to read carefully and understand the knowledge points, codes and architecture diagrams in the text in detail;

Spend another two days to review, recall the knowledge points in the catalog, and check the missing parts in time for the missing parts;

Spend another 3 hours to review before the interview to fully grasp the knowledge points of this article.

In this way, readers can have a fuller understanding of the breadth and depth of each knowledge point in the article, and will be confident in the interview.

I hope you can read this article carefully, slowly understand the essence of this article, and gradually increase your technical breadth and depth, so that you can become more valuable!

I hope this article can help you, everyone, come on and study hard! !

Guess you like

Origin blog.csdn.net/m0_46995061/article/details/108796588