Are Java interviews just memorizing answers?

To be honest, it will not work if you don't memorize it. You must understand these questions!

Because there are too many words, only interview questions are given in categories, and the answer to each question is at the end of the article

1. 32 MySQL interview questions

1: Do you understand the logical architecture of MySQL?

2: Talk about MySQL's read-write lock

3: What is the lock strategy of MySQL?

4: How to solve the database deadlock?

5: What is a transaction?

6: What are the characteristics of transactions?

7: What are the isolation levels of MySQL?

8: What is MVCC?

9: Talk about InnoDB

10: Talk about MyISAM

11: Talk about Memory

12: What is the query execution process?

13: The difference between VARCHAR and CHAR?

14: What is the difference between DATETIME and TIMESTAMP?

15: What are the optimization strategies for data types?

16: What is the function of the index?

17: Talk about MySQL's B-Tree index

18: Do you know Hash index?

19: What is an adaptive hash index?

20: What is a spatial index?

21: What is a full-text index?

22: What is a clustered index?

23: What is a covering index?

24: Do you know which index usage principles?

25: What are the circumstances of index failure?

26: How to locate inefficient SQL?

27: What is the role of SHOW PROFILE?

28: What does trace do?

29: What are the fields of EXPLAIN and what are their meanings?

30: What are the strategies for optimizing SQL?

31: The role of MySQL master-slave replication?

32: The steps of MySQL master-slave replication?

2. 15 design pattern interview questions

1: What are the principles of design patterns?

2: Classification of design patterns, which design patterns do you know?

3: Talk about the simple factory model

4: Talk about the factory method pattern

5: Do you understand the abstract factory pattern?

6: What are the characteristics of the singleton mode?

7: What are the implementations of the singleton pattern?

8: Talk about the agency model

9: Talk about the decorator mode

10: The difference between decorator mode and dynamic proxy?

11: Talk about the adapter mode

12: What is the difference between adapter mode and decorator mode and proxy mode?

13: Talk about the strategy model

14: Talk about the template mode

15: Talk about the observer mode

Three or five Mybatis interview questions

1: What are the advantages and disadvantages of Mybatis?

2: What tag attributes does the Mybatis XML file have?

3: What is the primary cache of Mybatis?

4: What is the secondary cache of Mybatis?

5: The difference between Mybatis #{} and ${}?

Four, 4 Spring Data JPA interview questions

1: What is ORM?

2: How to use JPA?

3: What are the relevant solutions for JPA entity classes?

4: What is the object navigation query?

Five or three Spring MVC interview questions

1: What is the processing flow of Spring MVC?

2: What are the components of Spring MVC?

3: What is the focus of Spring MVC?

Six, 4 AOP interview questions

1: What is AOP?

2: What are the relevant solutions for AOP?

3: What are the related terms of AOP?

4: The process of AOP?

Seven, 11 Spring IoC interview questions

1: What is IoC?

2: IoC container initialization process?

3: What are the implementation methods of dependency injection?

4: What is the relevant solution for dependency injection?

5: The process of dependency injection?

6: Bean's life cycle?

7: What is the scope of Bean?

8: How to create Bean through XML?

9: How to create Bean through annotations?

10: How to annotate configuration files?

11: What is the difference between BeanFactory, FactoryBean and ApplicationContext?

8. 11 JUC interview questions

1: What is CAS?

2: What's wrong with CAS?

3: What are the atomic classes?

4: What is the principle of AtomicIntger to achieve atomic update?

5: What is CountDownLatch?

6: What is CyclicBarrier?

7: What is Semaphore?

8: What is Exchanger?

9: The principle of ConcurrentHashMap of JDK7?

10: The principle of ConcurrentHashMap of JDK8?

11: What is the thread-safe collection of ArrayList?

Nine, 37 concurrent interview questions

1: What is the role of JMM?

2: What is as-if-serial?

3: What is happens-before?

4: What is the difference between as-if-serial and happens-before?

5: What is instruction reordering?

6: What are atomicity, visibility, and order?

7: Talk about volatile

8: Can final guarantee visibility?

9: What are the strategies for lock optimization?

10: What is a spin lock?

11: What is adaptive spin?

12: What is lock elimination?

13: What is lock coarsening?

14: What is a bias lock?

15: What is a lightweight lock?

16: What is the difference between biased locks, lightweight locks and heavyweight locks?

17: What is the difference between Lock and synchronized?

18: How is the reentrancy of ReentrantLock realized?

19: What is a read-write lock?

20: Does AQS understand?

21: What are the two modes of AQS?

22: The principle of AQS exclusive acquisition/release of locks?

23: Why can I try to obtain the synchronization status only when the predecessor node is the head node?

24: The principle of AQS shared acquisition/release lock?

25: What are the states of the life cycle of a thread?

26: What are the ways to create threads?

27: What are the methods for threads?

28: What is a daemon thread?

29: What are the ways of thread communication?

30: What are the benefits of thread pools?

31: The process of thread pool processing tasks?

32: What are the ways to create a thread pool?

33: What are the parameters for creating a thread pool?

34: How to close the thread pool?

35: What is the selection strategy of the thread pool?

36: What are the options for blocking queues?

37: Talk about ThreadLocal

10. 32 JVM interview questions

1: What is the runtime data area?

2: What is the program counter?

3: The role of the Java virtual machine stack?

4: The role of the local method stack?

5: What is the role of the heap?

6: What is the role of the method area?

7: What is the function of the runtime constant pool?

8: What is direct memory?

9: The difference between memory overflow and memory leak?

10: The cause of heap overflow?

11: The reason for stack overflow?

12: The reason for constant pool overflow during runtime?

13: The reason for the method area overflow?

14: What is the process of creating an object?

15: What are the ways to allocate memory for objects?

16: Is the object allocated memory thread safe?

17: Do you understand the memory layout of the object?

18: What are the access methods of the object?

19: How to judge whether the object is garbage?

20: What are the types of references in Java?

21: What are the GC algorithms?

22: Which garbage collectors do you know?

23: Does ZGC understand?

24: What memory allocation and recovery strategies do you know?

25: What troubleshooting tools do you know?

26: How does the Java program run?

27: What is class loading?

28: What are the situations of class initialization?

29: What is the process of class loading?

30: What class loaders are there?

31: What is the parent delegation model?

32: How to judge whether two classes are equal?

Eleven, 6 IO streaming interview questions

1: What is the difference between synchronous/asynchronous/blocking/non-blocking IO?

2: What is BIO?

3: What is NIO?

4: What is AIO?

5: What streams are there under the package?

6: What is serialization and deserialization?

Twelve, 7 collective interview questions

1: Talk about ArrayList

2: Talk about LinkedList

3: What are the characteristics of Set and what are its implementations?

4: What are the characteristics of TreeMap?

5: What are the characteristics of HashMap?

6: The source code of HashMap related methods?

7: Why is HashMap thread unsafe?

Thirteen, 10 object-oriented interview questions

1: Talk about your understanding of object-oriented

2: Three characteristics of object-oriented?

3: The difference between overloading and rewriting?

4: What are the relationships between classes?

5: What methods does the Object class have?

6: What is the function of internal classes and what are the classifications?

7: What are the access authority control characters?

8: What are the similarities and differences between interfaces and abstract classes?

9: How to choose interface and abstract class?

10: The order of subclass initialization

14. 12 Interview Questions for Language Features

1: What are the advantages of the Java language?

2: How does Java achieve platform independence?

3: The difference between JDK and JRE?

4: Java call by value or by reference?

5: What is the difference between shallow copy and deep copy?

6: What is reflection?

7: What is the role of Class? How to obtain a Class object?

8: What is a comment? What are meta annotations?

9: What is generic and what is its function?

10: What is generic erasure?

11: What are the new features of JDK8?

12: What are the classifications of anomalies?

In order to make it easier for all the friends to review the interview questions that they don’t understand, Brother Wu compiled the answers to these interview questions into PDFs and gave them to everyone for free. I only hope that you can use three links with one key to show you the catalog and ensure that it is convenient for review. .

Insert picture description here

Whether it’s for review or interview, this interview question can definitely help you. You can reply to the "Java Interview Question" in the backstage of Brother Wu’s public account "Five Minutes Learning Algorithm", and you can get this interview question for free PDF version.

In addition, if you want to see the online version, you can also go to Brother Wu’s personal website. There are hundreds of thousands of friends who have logged in to learn. Click to view the Java interview questions.

About the Author

Author: Hello everyone, I am a programmer Brother Wu. I have open sourced a project LeetCodeAnimation on GitHub. Currently, it has 60k stars. The algorithm is explained in the form of animation. It has helped thousands of programmers get started with the algorithm. Welcome to pay attention to the public account. "Five minutes to learn algorithms", learn algorithms with us.
Reprinting instructions: Reprinting is prohibited without authorization