1 year + experience in social recruitment of Java experience summary sharing

No show talk, just start!

Insert picture description here

Common knowledge points

1. Java's basic data types and packaging classes;

2. The final modification variable class method;

3. Why String is immutable, and new String("abc") creates several objects;

4. The difference between String, StringBuffer, and StringBuilder;

5. Static modified variables, methods, code blocks;

6. The difference between rewriting and reloading;

7. Interfaces and abstract classes;

8. Knowledge points such as reflection, inheritance, enumeration, and exception;

9. Why rewrite the hashcode and equals methods, and whether the hashcode is the same and equals are the same;

10. The difference between JDK 1.7 and before 1.8;

11, i ++ sum ++ i;

Collection related

1. ArrayList's underlying implementation, expansion process, add process, Fail-Fast mechanism;

2. The difference between ArrayList and Linkedlist and Vectot;

3. How to obtain a thread-safe List;

4. How does CopyOnWriteArrayList achieve thread safety;

5. The underlying implementation of Linkedlist and how to use LinkedList to implement an LRU;

6. The underlying implementation of TreeSet, HashSet, LinkedHashSet and the difference between them;

7. Implementation and difference of PriorityQueue, LinkedBlockingQueue, ArrayBlockingQueue;

8. The underlying implementation of HashMap, the expansion process, will it be expanded when the threshold is reached, the put process, the treeing process, how to determine the load factor, why the thread is unsafe, and what optimizations have been made in 1.8;

9. The difference between HashMap and HashTable, how to obtain a thread-safe Map;

10. Why is ConcurrentHashMap thread-safe, and what optimizations have been made in 1.8;

11. The underlying implementation of LinkedHashMap and how to implement LRU;

12. The underlying implementation of TreeMap;

13. Implementation of iterators;

JVM related

1. The runtime data area, what is stored in each area, and how to interact;

2. The entire process of an object from creation to recycling (from class loading to GC), there is basically no big problem to master this;

3. What data are stored in the objects in the heap, and the data in the object header (usually asked during the Synchronized lock upgrade process);

4. Determine whether the memory area needs recycling, garbage collection algorithm, garbage collector (mainly master CMS, G1, of course, the better);

5. Memory allocation strategy (how to allocate in Eden and the old generation), recovery strategy (Minor GC, Full GC);

6, Java memory model (not java memory area), often asked in the thread (the design and implementation of volatitle);

7. The virtual machine class loading mechanism, the life cycle of the class, the class loader (you can try the handwritten class loader has been asked before), the parent delegation model;

8. Jvm tuning and fault handling, you can manually implement the following;

Multithreading and locking

1. The difference between process and thread, how to determine the maximum number of threads you create according to the hardware (thread pool needs to be considered);

2. The method of thread creation, how to get a thread with return value;

3. The state and attributes of the thread;

4. Communication between threads, sleep, yield, join, wait, notify\notifyAll, semaphore, pipeline, and the difference between sleep and wait;

5. Locks, biased locks, lightweight locks, heavyweight locks, optimistic locks, pessimistic locks, spin locks, shared locks, exclusive locks, reentrant locks and non-reentrant locks;

6. The underlying implementation of volatitle;

7. Synchronized underlying implementation, lock upgrade process, the difference between instance lock and class lock, and the difference with Lock;

8. The principle and realization of CAS and AQS;

9. Implementation principles and characteristics of ReentrantLock, ReentrantReadWriteLock, and StampedLock;

10. The characteristics and underlying principles of ThreadLocal;

11. The parameters needed to create the thread pool, how to set the parameters, the running process of the thread pool, how to under high concurrency 12. Use the thread pool;

Mysql related

1. The difference between innoDB and myisam;

2. InnoDB's index implementation, unique index, covering index, prefix index, joint index, and leftmost matching principle;

3. When do you need an index, and how to choose an index;

4. MVCC principle, redo, undo, rollback segment;

5. What are self-increasing locks, shared locks, exclusive locks, intention locks, insertion intention locks, record locks, and gap locks;

6. The four major characteristics of transactions, the problems caused by concurrency consistency, the problems solved by the four isolation levels, and how to implement them (what locks are added);

7. The third normal form;

8. How to optimize mysql;

Redis related

1. Why is Redis so fast;

2. Redis data structure and underlying implementation;

3. Redis persistence mechanism, RDB, AOF and how to choose, AOF rewrite;

4. Redis expired key deletion strategy and memory elimination strategy;

5. Redis transaction;

6. Redis high availability, high performance, Redis master-slave architecture, Redis Sentinel, Redis cluster solutions;

7. Cache penetration, cache breakdown, cache avalanche causes and solutions;

Spring related

1. Introduce IOC and AOP;

2. What are the ways for spring to configure bean instantiation;

3. What are the ways for Bean to inject properties;

4. The scope of Spring beans;

5. The life cycle of Spring Bean (it is recommended to look at the full IOC life cycle and have the ability to look at the source code);

6. Is the singleton bean in the Spring framework thread-safe, and how to deal with it;

7. The underlying implementation of Spring AOP and the implementation of two dynamic agents (it is recommended to implement the two agent methods manually);

8. Various noun concepts in AOP;

9. The problem of circular dependency, let's talk about the three-level cache;

10. The propagation behavior, isolation level, supermarket attributes, read-only attributes, and rollback rules of Spring transactions;

11. And various annotations in Spring;

SpringBoot

1. Analysis of Springboot startup principle;

2. The life cycle of Springboot;

3. SpringBoot automatic configuration module;

4、SpringBoot Starters;

5. Introduction to SpringBootApplication;

SpringCloud

1. Introduce the function of each component;

2. REST API and RPC;

3. The difference between Spring Cloud and dubbo;

4. How does Eureka achieve high availability;

5. What is Eureka's self-protection model

6. Both Eureka and ZooKeeper can provide service registration and discovery functions. Please tell us the difference between the two;

Dubbo

1. Service registration and discovery;

2 、 SPI ;

3. Service exposure process;

4. Service reference;

5. Downgrade;

6. Load balancing;

Design Patterns

1. The more you know about factory design mode, strategy mode, construction mode, appearance mode, singleton design mode, observation mode, etc., the better;

2. Generally, interviewers will ask you which one you have used instead of which one is used in the framework. Anyway, I always said that I used the strategy pattern (I'd better use a design pattern in the code);

message queue

1. Why use message queues in the project and what message queues can be used for;

2. How to solve the problems of repeated message consumption, message loss, message backlog, sequential consumption, etc.;

3. How to ensure the high availability of the message queue;

High concurrency scenarios

1. How to insert and delete 5 million pieces of data into the database regularly to ensure that the data is inserted correctly to achieve the optimal solution;

2. How to design and use Redis under high concurrency;

3. What are microservices and distributed?

4 、 BIO 和 NIO ;

5. How to design an interface in high concurrency scenarios to ensure high performance and high availability of this interface;

6. Distributed locks (implemented by Redis and zookeeper), and distributed transactions. If you haven't understood the distributed transaction, I suggest you use the local message table to implement it. It is simple to have at least an overall concept.

computer network

1. What is the seven-layer protocol;

2. Shake hands three times and wave four times;

3. What happened from entering the URL in the browser to returning to the web page;

4. I don't know much about computer networks, and I have been asked some in-depth questions about HTTP, HTTPS, and TCP;

algorithm

1. If you have time, it is recommended to brush more algorithms, if you don't have time, just look at the common algorithms;

2. Mainly the data structure, asking about the time and space complexity;

3. Asked the big top pile;

4. How to read a large file with many URLs stored in it, how to find the most commonly used URLs;

5. There are also common url conversion problems;

6. Reverse the linked list, find the same number in two arrays, etc.;

At last

In view of the fact that many people have been interviewing recently, I have also compiled a lot of interview topic materials here, as well as experience from other major companies. Hope it helps everyone.

Insert picture description here

The answers to the above interview questions are organized into document notes. I also sorted out some interview materials & the latest interview questions collected by some big companies in 2020 (all organized into documents, a small part of the screenshots), if necessary, you can click to enter the password: csdn

Insert picture description here

The above is the whole content of this article, I hope it will be helpful to everyone's study, and I hope you can support it. One-click three consecutive!

Guess you like

Origin blog.csdn.net/qq_41770757/article/details/109005177