Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for interview in 2021

Usher in gold three silver four.

Presumably, many people are preparing for this golden period, hopping jobs, raising salaries, and looking for jobs~ But do you really want to make a plan and feel at a loss and don't know where to review it? Today, I will share with you a set of Java interview questions that have taken some time to organize. I hope it can help you.

 

Click here for free interview materials! !

Java basic related interview questions

1. The difference between List and Set.

2. How does HashSet guarantee non-repetition?

3. Is HashMap thread safe? Why is it not thread safe (it is best to draw a picture to show that it is not safe in a multi-threaded environment)?

4. The expansion process of HashMap.

5. The difference between HashMap1.7 and 1.8, explain what optimizations have been made in 1.8 and how to optimize them?

6、final finally finalize。

7. Strong references, soft references, weak references, and phantom references.

8. Java reflection.

9. The realization principle of Arrays.sort and the realization principle of Collection.

10. Application of LinkedHashMap.

11. Implementation principle of cloneable interface.

12. The difference between wait and sleep.

13. How is the array allocated in memory?

Java concurrency related interview questions

1. The realization principle of synchronized and lock optimization?

2. The realization principle of volatile?

3. Java semaphore?

4. What is the difference between synchronized in static method and ordinary method?

5. How to realize that all threads wait for an event to occur before executing?

6. CAS? What are the shortcomings of CAS and how to solve them?

7. What is the difference between synchronized and lock?

8. How is Hashtable locked?

9. What is the concurrency problem of HashMap?

10. Introduction to ConcurrenHashMap? Why use red-black trees in 1.8?

11. Brief description of AQS.

12. How to detect deadlock? How to prevent deadlock?

13. Java memory model?

14. How to ensure the correct result of i++ under multi-threading?

15. Types, differences and usage scenarios of thread pools?

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

JVM related interview questions

1. The memory structure of JVM.

2. The working process of the JVM method stack, what is the difference between the method stack and the local method stack?

3. How do references in the JVM stack relate to objects in the heap.

4. You can learn about escape analysis techniques.

5. The common algorithms of GC, the garbage collection process of CMS and G1, which two of the various stages of CMS are Stop the world, will CMS generate fragments, and the advantages of G1.

6. The understanding and advantages and disadvantages of mark removal and mark sorting algorithms.

7. The proportion of eden survivor area, why is this proportion, the working process of eden survivor.

8. How does the JVM judge whether an object should be GC, and what types of roots can be considered?

9. The difference between strong and weak references and what kind of operations GC performs on them?

10. Whether Java can GC direct memory.

11. The process of Java class loading.

12. The process and advantages of the parent delegation model.

13. Commonly used JVM tuning parameters.

14. Analysis of dump files.

15. Does Java have a way to actively trigger GC (no).

Spring related interview questions

1、BeanFactory和FactoryBean?

2. What is the understanding of Spring IOC and its initialization process?

3、BeanFactory和ApplicationContext?

4. How is the life cycle of Spring Bean managed?

5. What is the loading process of Spring Bean?

6. If you want to implement Spring AOP, how do you implement it?

7. If you were to implement Spring IOC, what issues would you pay attention to?

8. How does Spring manage transactions and transaction management mechanisms?

9. What are the different transaction propagation behaviors of Spring and what are they used for?

10. What design patterns are used in Spring?

11. How does Spring MVC work?

12. The principle of Spring cycle injection?

13. Understanding of Spring AOP, each terminology, how do they work with each other?

14. If you have used struts2, briefly introduce the differences between springMVC and struts2?

15. How does Spring Mvc set up redirection and forwarding?

16. How is the interceptor written in Spring Mvc?

17. What is the Spring IOC container?

18. What is dependency injection? How many ways can dependency injection be done?

19. Distinguish between BeanFactory and ApplicationContext

20. What is the life cycle of the Spring Bean container?

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

Redis related interview questions

1. The difference between RDB and AOF.

2. Why RDB forks child processes instead of threads.

3. Redis basic data types.

4. The underlying data structure of zset, when does the jump table increase its height.

5. Distributed redis, cache and database read and write are inconsistent, and the answer is delayed double deletion.

6. The interviewer asked to talk about Redis casually, so he also talked about cache penetration, breakdown, avalanche and processing methods.

7. What are the advantages of Redis over memcached?

8. What physical resources does Redis consume?

9. What kinds of data elimination strategies does Redis have?

10. Why doesn't Redis officially provide a Windows version?

11. What is the maximum storage capacity of a string type value?

12. Why does Redis need to put all data in memory?

13. What should the Redis cluster solution do? What are the options?

14. What should the Redis cluster solution do? What are the options?

15. Under what circumstances will the Redis cluster solution cause the entire cluster to be unavailable?

16. What are the suitable scenarios for Redis?

17. What is the relationship between Redis and Redisson?

18. What are the advantages and disadvantages of Jedis and Redisson?

19. Tell me about the concept of Redis hash slot?

20. How to choose a database for Redis cluster?

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

Click here for free interview materials! !

MySQL related interview questions

1. Four characteristics of transaction (ACID) atomicity, consistency, isolation, and durability?

2. Concurrency of transactions? Transaction isolation level, what problems will each level cause, which level is MySQL by default?

3. What is the difference between the three common storage engines (InnoDB, MyISAM, MEMORY) in MySQL?

4. What are the application scenarios of MySQL's MyISAM and InnoDB storage engines, transaction and lock levels?

5. What is the order in which the different elements of the query statement (where, jion, limit, group by, having, etc.) are executed?

6. What is a temporary table and when will the temporary table be deleted?

7. What is the difference between MySQL B+Tree index and Hash index?

8. The SQL query statement determines which type of index to create? How to optimize the query?

9. The difference between clustered index and non-clustered index?

10. What locks are there (optimistic locks, pessimistic locks), and how to add exclusive locks when selecting?

SpringBoot-Spring Cloud related interview questions

1. What is Spring Boot?

2. What are the advantages of SpringBoot?

3. What is JavaConfig?

4. How to reload the changes on Spring Boot without restarting the server?

5. What is the monitor in Spring Boot?

6. How to disable Actuator endpoint security in Spring Boot?

7. How to run Spring Boot applications on custom ports?

8. What is YAML?

9. How to realize the security of Spring Boot application?

10. How to integrate Spring Boot and ActiveMQ?

MyBatis related interview questions

1. What is Mybatis?

2. The advantages of Mybaits? Disadvantages of the MyBatis framework?

3. Application occasions of MyBatis framework

4. What is the difference between MyBatis and Hibernate?

5. What is the difference between #{} and ${}?

6.How to write like statement in fuzzy query?

7. How does Mybatis perform paging? What is the principle of the paging plug-in?

8. Why is Mybatis a semi-automatic ORM mapping tool? What is the difference between it and fully automatic?

9. How many ways does MyBatis implement one-to-one? How do you do it?

10. There are several ways to realize one-to-many in MyBatis, how to operate?

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

Tomcat related interview questions

1. What is Tomcat?

2. What is the default port of Tomcat and how to modify it?

3. What kinds of connector operating modes (optimization) does tomcat have?

4. How many deployment methods does Tomcat have?

5. How does the tomcat container create an instance of the servlet class? What principle was used?

ZooKeeper related interview questions

1. What is ZooKeeper?

2. What does ZooKeeper provide?

3. Zookeeper file system.

4. How does Zookeeper ensure that the status of the master and slave nodes are synchronized?

5. Four types of data nodes Znode.

6. Zookeeper Watcher mechanism-data change notification.

7. The client registers the Watcher implementation.

8. The server handles Watcher implementation.

9. The client calls back Watcher.

10. ACL permission control mechanism.

Microservice-related interview questions

1. How is the front-end separation done? What frameworks for microservices?

2. Talk about the realization principle of RPC, talk about the realization principle of Dubbo

3. What are the advantages of microservice architecture? What are the characteristics of microservices?

4. What are the best practices for designing microservices?

5. How does the microservice architecture work?

6. What are the advantages and disadvantages of the microservice architecture?

7. Monolithic, what is the difference between SOA and microservice architecture?

8. What is the main difference between SOA and microservice architecture?

9. API management

10. Service melting (hystrix), service tracking (starter-sleuth)

Netty related interview questions

1. What is Netty?

2. What are the characteristics of Netty?

3. What are the advantages of Netty?

4. What are the application scenarios of Netty?

5. What are the aspects of Netty's high performance?

6. What is the difference between BIO, NIO and AIO?

7. What is the composition of NIO?

8. Netty's threading model?

9. The reasons and solutions for TCP sticking/unpacking?

10. What is Netty's zero copy?

Interview questions related to Java concurrent programming

1. What is context switching in multithreading?

2. The difference between deadlock and livelock, and the difference between deadlock and starvation?

3. What is the thread scheduling algorithm used in Java?

4. What is a thread group and why is it not recommended in Java?

5. Why use Executor framework?

6. What is a blocking queue? What is the realization principle of blocking queue? How to use blocking queues to implement the producer-consumer model?

7. What are Callable and Future?

8. What is FutureTask? Use ExecutorService to start a task

9. What is the implementation of concurrent containers?

10. There are several ways to achieve multi-thread synchronization and mutual exclusion, what are they?

11. How do you wake up a blocked thread in Java?

12. What is the difference between CycliBarriar and CountdownLatch in Java?

13. What is a thread group and why is it not recommended in Java?

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

Database-related interview questions

1. Indexes, common index principles, limit the number of indexes

2.mylasm, memory, tokudb, B+ tree, concept

3. Sort binary tree, prefix tree, red-black tree, bitmap

4. Database concurrency strategy, optimistic locking, pessimistic locking, timestamp

5. Based on Redis distributed lock, two-phase commit protocol, preparation phase, commit phase, shortcomings

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

At last

Considering the length, I emphatically selected some common and important interview questions to show.
All the interview questions are not static. The above interview questions are just a reference for everyone. The most important thing is to increase your knowledge reserve and be prepared.

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

 

Considering the length, I emphatically selected some common and important interview questions to show.

All the interview questions are not static. The above interview questions are just a reference for everyone. The most important thing is to increase your knowledge reserve and be prepared.

 

How to get information: Click here to get interview information for free! !

"Practicing hands" before the interview is still very important. You must be prepared before you start the interview, otherwise it will delay the interviewer and yourself.

Fliggy, Sina, Ele.me Internal Java Interview Manual, a must-see for 2021 interview

Guess you like

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