current position:Home>This eight part essay of Java interview made 329 people successfully enter the big factory, which can be called the strongest in 2021

This eight part essay of Java interview made 329 people successfully enter the big factory, which can be called the strongest in 2021

2022-01-27 02:00:54 littlejava_

Preface

2021 Autumn is coming , Many students will ask Java Is it necessary to recite the eight part essay in the interview ?

My answer is : It is necessary to . You can hate this pattern , But you must recite , Because you can't enter a big factory without reciting it .

Domestic Internet interview , I'm afraid it's existing 、 The system closest to the imperial examination .

and , China's eight part essay is indeed unique . Take the United States for example , North American engineers pay more attention to Algorithms in the interview (Coding), Will also join in recent years Design round ( System design and object-oriented design OOD) and BQ round (Behavioral question, Behavioral interview questions ).

So why don't domestic interviews adopt such an investigation method ? Simply speaking , Internet IT There are too many job seekers in the industry , If you are looking at a bunch of algorithm problems and design problems , Then the interviewer will be required to have a very high technical level , It also takes a lot of time, cost and energy .

Perhaps the current eight part essay interview is not the best solution , But it is indeed the most consistent with the current domestic IT Environmental practices .

therefore , I interviewed more than 20 After a senior large factory interviewer , Has been trying to refine and accurately sort out a set of practical eight part essay , Now there are 329 Fans got into the ideal position through this set of questions , So share it with everyone , If there are any shortcomings, please comment and add .

Limited by space, this article only posts the title , Students can first see which questions they can , The answer is a book I sorted out 《Java Interview eight part essay 》PDF It's all in it , The method of obtaining is at the end of the article !

One 、Java Basics 44 Avenue

1. Explain what object orientation is ? The difference between object-oriented and process oriented ?

2. Three characteristics of object-oriented ? Explain separately ?

3. JDK、JRE、JVM The relationship between the three ?

4. The difference between overloading and rewriting ?

5. Java Can I rewrite a private perhaps static Method ?

6. What are the characteristics of construction methods ?

7. stay Java What's the use of defining a construction method that doesn't do anything and has no parameters ?

8. Java Several ways to create objects in ?

9. What's the difference between abstract classes and interfaces ?

10. Differences between static variables and instance variables ?

11. 12、short s1 = 1;s1 = s1 + 1; What's wrong with it? ? that short s1 = 1; s1 += 1; Well ? Are there any mistakes ?

12. Integer and int The difference between ?

13. The difference between packing and unpacking

14. switch Can statements work on byte On , Can it work in long On , Can it work in String On ?

15. 16、final、finally、finalize The difference between

16. == and equals The difference between ?

17. two-object hashCode() identical , be equals() It must be for true Do you ?

18. Why rewrite equals() It must be rewritten hashCode() Method ?

19. & and && The difference between ?

20. Java The value is passed when the parameter is passed ? Or is it a quote ?

21. Java Medium Math.round(-1.5) How much ?

22. How to clone objects ?

23. The difference between deep cloning and shallow cloning ?

24. What is? Java Serialization , How to achieve Java Serialization ?

25. When is serialization necessary ?

26. Java How do generics of work ? What is type erasure ?

27. What are qualified wildcards and unqualified wildcards in generics ?

28. List and List What's the difference between ?

29. Java What do you mean by reflection in ? What are the application scenarios ?

30. Advantages and disadvantages of reflection ?

31. Java What is the dynamic agent in ? What are the applications ?

32. How to implement dynamic proxy ?

33. static The role of keywords ?

34. super The role of keywords ?

35. The difference between byte and character ?

36. String Why design as immutable class ?

37. String、StringBuilder、StringBuffer The difference between ?

38. String The principle of string modification implementation ?

39. String str = "i" And String str = new String("i") Are they exactly alike? ?

40. String Common methods of the class have those ?

41. final modification StringBuffer It can be later append Do you ?

42. Java Medium IO Classification of flows ? Name a few implementation classes that you are familiar with ?

43. What is the difference between byte stream and character stream ?

44. BIO、NIO、AIO What's the difference? ?

Two 、Java abnormal 9 Avenue

1. finally When the code in the block is executed ?

2. finally Will it be carried out to ?

3. try-catch-finally in , If catch in return 了 ,finally Will it still be implemented ?

4. try-catch-finally Which part of the can be omitted ?

5. Error and Exception The difference between ?

6. What are the similarities and differences between runtime exceptions and checked exceptions ?

7. throw and throws The difference between ?

8. What are the common exception classes ?

9. Can the main thread catch the exception of the child thread ?

3、 ... and 、Java aggregate 24 Avenue

1. Java Which containers are commonly used in ?

2. ArrayList and LinkedList The difference between ?

3. ArrayList Realization RandomAccess What does the interface do ? why LinkedList It doesn't implement this interface ?

4. ArrayList Capacity expansion mechanism of ?

5. Array and ArrayList What's the difference ? When is it more suitable to use Array?

6. HashMap Implementation principle of / Underlying data structure ?JDK1.7 and JDK1.8

7. HashMap Of put Method execution process ?

8. HashMap Of get Method execution process ?

9. HashMap Of resize Method execution process ?

10. HashMap Of size Why must it be 2 Integer power of ?

11. HashMap The problem of multi thread dead cycle ?

12. HashMap Of get Method to determine whether an element is in map in ?

13. HashMap And HashTable What's the difference ?

14. HashMap And ConcurrentHashMap What's the difference ?

15. HashTable and ConcurrentHashMap The difference between ?

16. ConcurrentHashMap What is the implementation principle of ?

17. HashSet Implementation principle of ?

18. HashSet How to ensure that the elements do not repeat ?

19. LinkedHashMap Implementation principle of ?

20. Iterator How do you use it? ? What are the characteristics of ?

21. Iterator and ListIterator What's the difference? ?

22. Iterator and Enumeration Interface differences ?

23. fail-fast And fail-safe What's the difference? ?

24. Collection and Collections What's the difference? ?

Four 、Java Concurrent 42 Avenue

1. What's the difference between parallelism and concurrency ?

2. The difference between threads and processes ?

3. What is a daemon thread ?

4. Several ways to create threads ?

5. Runnable and Callable What's the difference? ?

6. Thread state and transition ?

7. sleep() and wait() The difference between ?

8. Thread run() and start() What's the difference? ?

9. stay Java How to ensure the safety of multithreading in the program ?

10. Java Several methods of thread synchronization ?

11. Thread.interrupt() How does the method work ?

12. Talk about right ThreadLocal The understanding of the ?

13. In which scenarios will ThreadLocal?

14. Say that you are right synchronized Key words ?

15. How to use synchronized Of ?

16. say something JDK1.6 After that synchronized What optimizations have been done at the bottom of keywords , Can you elaborate on these optimizations ?

17. Talk about synchronized and ReenTrantLock The difference between ?

18. synchronized and volatile What's the difference ?

19. Talk about you being right volatile Keyword understanding ?

20. Right ReentrantReadWriteLock The understanding of the ?

21. Talk about the understanding of pessimistic lock and optimistic lock ?

22. What are the two common implementations of optimistic locks ?

23. What are the disadvantages of optimistic lock ?

24. CAS and synchronized Usage scenarios of ?

25. In short, it's right Java Understanding of atomic classes in ?

26. atomic What is the principle of ?

27. Let's talk about the synchronizer AQS The understanding of the ?

28. AQS What is the principle of ?

29. AQS What are the sharing modes of resources ?

30. AQS The bottom layer uses the template method pattern , Can you name a few methods that need to be rewritten ?

31. Tell me about the semaphore Semaphore The understanding of the ?

32. CountDownLatch and CyclicBarrier What's the difference? ?

33. Let's talk about the understanding of thread pool ? Why use thread pools ?

34. What are the parameters for creating thread pool ?

35. How to create a thread pool ?

36. How to set the number of threads in the thread pool ? What issues need to be considered ?

37. perform execute() Methods and submit() What's the difference between methods ?

38. Right Fork and Join Understanding of parallel computing framework ?

39. JDK Which concurrent containers are provided in ?

40. Talk about right CopyOnWriteArrayList The understanding of the ?

41. Talk about right BlockingQueue The understanding of the ? Which implementation classes are there respectively ?

42. Talk about right ConcurrentSkipListMap The understanding of the ?

5、 ... and 、Java JVM 42 Avenue

1. The way Jvm The main components of ? And its role ?

2. Talk about the understanding of runtime data area ?

3. What's the difference between heap and stack ?

4. What's in the heap ? What's in the stack ?

5. Why distinguish between a heap and a stack ? Isn't it possible to store data on the stack ?

6. Java The value is passed when the parameter is passed ? Or is it a quote ?

7. Java How is the size of the object calculated ?

8. Two ways to access and locate objects ?

9. What are the ways to judge whether garbage can be recycled ?

10. Where does garbage collection start ?

11. Will objects marked as garbage be recycled ?

12. Talk about right Java Knowledge cited in ?

13. Talk about the understanding of memory leak ?

14. What is the root cause of memory leak ?

15. Give a few examples of possible memory leaks ?

16. Try to avoid memory leaks ?

17. What are the commonly used garbage collection algorithms ?

18. Why do we use generational collection algorithm ?

19. What kind of garbage collection algorithm should be adopted by the younger and older generations under generational collection ?

20. What is floating garbage ?

21. What is memory fragmentation ? How to solve ?

22. What are the common garbage collectors ?

23. Talk to you about CMS Understanding of garbage collector ?

24. Talk to you about G1 Collector understanding ?

25. Tell me your understanding of garbage collection strategy / Garbage collection time ?

26. Talk about your understanding of memory allocation ? How to allocate large objects ? Space allocation guarantee ?

27. Say what you used JVM Monitoring tools ?

28. How to use monitoring tools to tune ?

29. JVM Some parameters of ?

30. Talk about your understanding of class file structure ? What are the components of ?

31. Talk about your understanding of class loading mechanism ?

32. What are the functions of each stage of class loading ?

33. What are the class loaders ? What's the use of separation ?

34. The relationship between class and classloader ?

35. Talk about your understanding of the parental delegation model ? working process ? Why use

36. How to implement a custom classloader ? What to pay attention to ?

37. How to break the parental delegation model ?

38. What are the practical scenarios that need to break the parental delegation model ?

39. Talk about your understanding of compile time optimization and runtime optimization ?

40. why HotSpot Virtual machine should use the architecture of interpreter and compiler ?

41. Say you are right Java Understanding of memory model ?

42. What are the interactions between memory ? What rules need to be met ?

6、 ... and 、SSM frame 37 Avenue

1. Use Spring What are the benefits of a framework ?

2. Explain what is AOP?

3. AOP What are the ways of agency ?

4. How to achieve JDK A dynamic proxy ?

5. AOP Basic concepts of : section 、 Connection point 、 Cut in point, etc ?

6. Notification type (Advice) type (Advice) What are they? ?

7. Talk to you about IOC The understanding of the ?

8. Bean Life cycle of ?

9. Bean Scope of action ?

10. Spring Single case in Bean Do you understand the thread safety of ?

11. Talk to you about Spring The understanding of things in ?

12. Spring Transaction isolation level in ?

13. Spring The dissemination of things in ?

14. Spring What are the common injection methods ?

15. Spring What design patterns are used in the framework ?

16. ApplicationContext What are the usual implementations ?

17. Talk to you about MVC Understanding of patterns ?

18. SpringMVC How it works / Execute the process ?

19. SpringMVC What are the core components of ?

20. SpringMVC What are the common annotations ?

21. @RequestMapping What is the role of ?

22. How to solve POST Request Chinese garbled code problem ,GET How to deal with it ?

23. SpringMVC Is the controller in singleton mode , If so, there will be some problems , How to solve ?

24. SpringMVC How to set redirection and forwarding ?

25. SpringMVC How is the interceptor written inside ?

26. SpringMVC and Struts2 What are the differences ?

27. Talk to you about MyBatis The understanding of the ?

28. MyBaits What are the advantages and disadvantages of ?

29. MyBatis And Hibernate What are the differences ?

30. MyBatis in #{} and  ${} What's the difference ?

31. MyBatis How is paging done ? What's the principle of paging plug-ins ?

32. MyBatis There are several ways of paging ?

33. MyBatis What is the difference between logical and physical pages ?

34. MyBatis Whether delay loading is supported ? If the support , What is its implementation principle ?

35. The way MyBatis Level 1 cache and level 2 cache ?

36. Mybatis What are the actuators (Executor)?

37. MyBatis dynamic SQL What does it do ? What's going on SQL? Can you give us a brief account of the dynamic SQL The principle of implementation is not ?

7、 ... and 、MySQL 31 Avenue

1. Please tell me what you think of MySQL Understanding of Architecture ?

2. One SQL Statement execution flow in the database framework ?

3. What are the three paradigms of a database ?

4. char and varchar The difference between ?

5. varchar(10) and varchar(20) The difference between ?

6. Talk about your understanding of index ?

7. What data structure is used at the bottom of the index ?

8. Talk to you about B+ Understanding of trees ?

9. Why? InnoDB Storage engine selection B+ Trees, not B Trees ?

10. Talk about your understanding of clustering index ?

11. Talk about your understanding of hash index ?

12. Talk about your understanding of overlay index ?

13. Classification of indexes ?

14. Talk about your understanding of the leftmost prefix principle ?

15. How to know if the created index has been used ? Or how can we know why this statement runs slowly ?

16. When the index will fail ? That is, the query does not go through the index ?

17. How to optimize query performance ?

18. InnoDB and MyISAM Comparison ?

19. Talk about your understanding of horizontal segmentation and vertical segmentation ?

20. Which three threads are involved in master-slave replication ?

21. Causes and solutions of delay in master-slave synchronization ?

22. Talk about your understanding of database read-write separation ?

23. Please describe the characteristics of the transaction ?

24. Talk about your understanding of the level of transaction isolation ?

25. Explain what dirty reading is 、 No repeated reading or phantom reading ?

26. MySQL What is the default isolation level ?

27. Talk to you about MVCC Understanding ?

28. The way MySQL Row and table locks ?

29. InnoDB What are the lock algorithms of the storage engine ?

30. MySQL What means does the problem check have ?

31. MySQL database CPU Soar to 500% What can he do with it ?

8、 ... and 、Redis 12 Avenue

1. Talk about your right Redis Understanding ?

2. Redis What are the general usage scenarios ?

3. Redis What are the common features ?

4. Redis What data types are supported ?

5. Redis Why so soon? ?

6. What is cache penetration ? How to solve ?

7. What is a cache avalanche ? How to solve ?

8. How to ensure consistency between cache and database data ?

9. Redis There are several ways to persist ?

10. Redis How to implement distributed locks ?

11. Redis What are the elimination strategies ?

12. Redis Common performance problems and solutions ?

Nine 、 computer network 45 Avenue

1. Why do I need three handshakes ? Not twice ?

2. Why do you need to wave four times ? Not three times ?

3. TCP And UDP What are the differences ? Respective application scenarios ?

4. HTTP1.0,1.1,2.0 Different versions of

5. POST and GET What are the differences ? Respective application scenarios ?

6. HTTP What common status codes and usage scenarios ?

7. HTTP Status code 301 and 302 The difference between , What are their uses ?

8. In the process of interaction, if the data transmission is finished , I don't want to disconnect yet , How to maintain ?

9. HTTP How to connect long ? When will it time out ?

10. TCP How to ensure effective transmission and congestion control principle

11. IP What are the categories of addresses ?

12. GET In request URL The meaning of coding

13. What is? SQL Inject ? for instance ?

14. To talk about XSS attack , for instance ?

15. Let's talk about the five layer network model , The responsibilities of each layer ?

16. Under the simple said HTTPS and HTTP The difference between

17. The difference between symmetric encryption and asymmetric encryption

18. In short, what are the corresponding network protocols of each layer ?

19. ARP How the protocol works ?

20. TCP What are the main characteristics of ?

21. UDP What are the main characteristics of ?

22. TCP and UDP What are the corresponding common application layer protocols ?

23. Why? TIME-WAIT The state must wait 2MSL Time of ?

24. The function of the life keeping timer ?

25. TCP How does the protocol guarantee reliable transmission ?

26. Talk about your understanding of the stop waiting agreement ?

27. Talk to you about ARQ Understanding of the agreement ?

28. What do you know about sliding windows ?

29. Talk about your understanding of flow control ?

30. Talk about your right TCP Congestion control understanding ? What algorithms are used ?

31. What is a sticky bag ?

32. TCP How is the sticky package produced ?

33. How to solve unpacking and sticking ?

34. forward and redirect The difference between ?

35. HTTP What are the methods ?

36. Enter... In the browser URL The process from address to display home page ?

37. DNS Analytic process ?

38. Talk about your understanding of domain name caching ?

39. Talk about your right HTTP Understanding of long connection and short connection ? Which scenarios are applied respectively ?

40. HTTPS Working process of ?

41. HTTP and HTTPS The difference between ?

42. HTTPS Advantages and disadvantages ?

43. What is digital signature ?

44. What is digital certificate ?

45. Cookie and Session What's the difference? ?

Ten 、 operating system 32 Avenue

1. Briefly describe your understanding of concurrency and parallelism ?

2. Sync 、 asynchronous 、 Blocking 、 The concept of non blocking

3. Basic concepts of processes and threads

4. The difference between a process and a thread ?

5. Why is there a process , There are also threads ?

6. State transition process

7. What are the modes of communication between processes ?

8. What are the scheduling algorithms of processes ?

9. What is a deadlock ?

10. Cause of deadlock ?

11. Necessary conditions for deadlock ?

12. The basic solution to deadlock ?

13. How to prevent deadlock ?

14. How to avoid deadlock ?

15. How to release the deadlock ?

16. What is buffer overflow ? What's the harm ?

17. The difference between pagination and segmentation ?

18. Physical address 、 Logical address 、 The concept of virtual memory

19. What are the page replacement algorithms ?

20. Talk about your understanding of dynamic link library and static link library ?

21. What's the difference between external interrupts and exceptions ?

22. The whole process of a program from the beginning to the end , How much can you say ?

23. What are user mode and kernel mode

24. How to switch between user mode and kernel mode ?

25. The way the process terminates

26. Daemon 、 Zombie process and orphan process

27. How to avoid zombie process ?

28. Introduce several typical locks ?

29. Common memory allocation errors

30. In memory swap , Where is the swapped out process stored ?

31. How is atomic operation realized

32. Do you know what it is ? It is also called bumping phenomenon

11、 ... and 、 Message queuing and distribution 26 Avenue

1. The basic function of message queuing ?

2. What are the advantages and disadvantages of message queuing ?

3. How to ensure high availability of message queues ?

4. How to ensure that messages are not consumed repeatedly ? Or say , How to guarantee the idempotence of message consumption ?

5. How to ensure the reliable transmission of messages ? Or say , How to deal with the problem of message loss ?

6. How to ensure the order of messages ?

7. A lot of news is in MQ A long backlog , How to solve ?

8. MQ What to do if the message in is out of date ?

9. RabbitMQ What are the important roles ?

10. RabbitMQ What are the important components ?

11. RabbitMQ There are several types of broadcasts ?

12. Kafka Can be separated from zookeeper Alone? ? Why? ?

13. Kafka There are several strategies for data retention ?

14. Kafka What are the partitioning strategies of ?

15. Talk about your right Zookeeper The understanding of ?

16. Zookeeper What are the features ?

17. Talk about your right ZAB Understanding of the agreement ?

18. Zookeeper How do I keep the state of master and slave nodes synchronized ?

19. Zookeeper There are several deployment patterns ?

20. The way Zookeeper Notification mechanism of ?

21. Why have a master node in a cluster ?

22. In the cluster has 3 Servers , One of the nodes is down , This is the time Zookeeper Is it still usable ?

23. Let's talk about the process of two-phase commit and three-phase commit ? What's the matter with each other ?

24. Zookeeper How to deal with downtime ?

25. Let's talk about four types of data nodes Znode?

26. Zookeeper and Dubbo The relationship between ?


Okay , That's all for this article , The answers to all the above questions are sorted into PDF 了

Students who need praise + Focus on , Home page private mail can be obtained

copyright notice
author[littlejava_],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270200517705.html

Random recommended