The latest interview surprise! 300 Questions for Gold, Three Silver, and Four Java Intermediate and Advanced Interviews

Another year of warm spring, I don't know if you have gained something this spring, but I have gained a lot anyway!

After working for a year, I jumped from an Internet company in Changsha with a monthly salary of 7k to 15k in Wuhan. During this period, I also received offers from several Internet companies in Shanghai and Guangzhou. Finally, after a compromise, I chose a company with not the highest salary, but not 996!

In the past 2 months, my colleagues and I have also experienced hundreds of interviewers, big and small, all the way through. In the end, only 3-4 people failed to gain something in this spring recruitment, and the salary increase of others They are all between 5-8k, and the few colleagues who have not passed the test are also very annoyed, and they are also squeezed out in the company (before the spring recruitment, I have been trying to figure out the experience, and now it seems that I heard that I am recruiting new people, and there is no salary increase. news), vowed to reap their own golden fruits in this year's autumn tricks!

As colleagues and alumni who joined the company together, our colleagues who have successfully landed can’t help but collect and sort out some important knowledge points encountered in the interviews in the past two months. Gold Three and Silver Four recently released "A Collection of Intermediate and Advanced Interview Questions in Java".

We summarized the interview questions, removed some common but relatively simple interview questions, and added some new interview questions, and divided these interview questions into 19 modules, so that everyone can compare their skills short Go to the board for key review!

Coverage:  Java foundation, container, multithreading, reflection, object copy, Java Web, exception, network, design pattern, Spring / Spring MVC, Spring Boot / Spring Cloud, Hibernate, Mybatis, RabbitMQ, Kafka, Zookeeper, MySql, Redis 、JVM

Module 1: Java Fundamentals

  1. What is the difference between JDK and JRE?
  2. What is the difference between == and equals?
  3. If the hashCode() of two objects is the same, then equals() must also be true, right?
  4. What is the role of final in java?
  5. What is Math.round(-1.5) equal to in java?
  6. Is String one of the underlying data types?
  7. What classes are there for manipulating strings in java? What's the difference between them?
  8. Is String str="i" the same as String str=new String("i")?
  9. How to reverse a string?
  10. What are the commonly used methods of the String class?
  11. Do abstract classes have to have abstract methods?
  12. What is the difference between ordinary class and abstract class?
  13. Can an abstract class be finalized?
  14. What is the difference between interface and abstract class?
  15. How many types of IO streams are there in java?
  16. What is the difference between BIO, NIO, and AIO?
  17. What are the common methods of Files?

Module Two: Containers

  1. What are the java containers?
  2. What is the difference between Collectionand Collections?
  3. What is the difference between List, Set, Map?
  4. What is the difference between HashMap and Hashtable?
  5. How to decide to use HashMap or TreeMap?
  6. Tell me about the implementation principle of HashMap?
  7. Tell me about the implementation principle of HashSet?
  8. What is the difference between ArrayList and LinkedList?
  9. How to realize the conversion between array and List?
  10. What is the difference between ArrayList and Vector?
  11. What is the difference between Array and ArrayList?
  12. What is the difference between poll() and remove() in Queue?
  13. Which collection classes are thread safe?
  14. What is iterator Iterator?
  15. How to use Iterator? What are the characteristics?
  16. What is the difference between Iterator and ListIterator?

Module Three: Multithreading

  1. What is the difference between Parallel and Concurrent?
  2. Difference between thread and process?
  3. What is a daemon thread?
  4. What are the ways to create threads?
  5. What is the difference between runnable and callable?
  6. What states does a thread have?
  7. What is the difference between sleep() and wait()?
  8. What is the difference between notify() and notifyAll()?
  9. What is the difference between run() and start() of a thread?
  10. What are the ways to create a thread pool?
  11. What are the states of the thread pool?
  12. What is the difference between the submit() and execute() methods in the thread pool?
  13. How to ensure the safety of multi-threaded operation in java program?
  14. What is the upgrade principle of multi-threaded locks?
  15. What is deadlock?
  16. How to prevent deadlock?
  17. What is ThreadLocal? What are the usage scenarios?
  18. Tell me about the underlying implementation principle of synchronized?
  19. What is the difference between synchronized and volatile?
  20. What is the difference between synchronized and Lock?
  21. What is the difference between synchronized and ReentrantLock?
  22. Tell me about the principle of atomic?

Module Four: Reflection

  1. What is reflection?
  2. What is java serialization? When is serialization required?
  3. What is a dynamic proxy? What are the applications?
  4. How to implement dynamic proxy?

Module Five: Object Copy

  1. Why use cloning?
  2. How to achieve object cloning?
  3. What is the difference between deep copy and shallow copy?

Module Six: Java Web

  1. What is the difference between jsp and servlet?
  2. What built-in objects does jsp have? What are the functions?
  3. Tell me about the 4 scopes of jsp?
  4. What is the difference between session and cookie?
  5. Talk about the working principle of session?
  6. If the client bans cookies, can the session still be used?
  7. What is the difference between spring mvc and struts?
  8. How to avoid sql injection?
  9. What is an XSS attack and how to avoid it?
  10. What is a CSRF attack and how to avoid it?

Module Seven: Exceptions

  1. The difference between throw and throws?
  2. What is the difference between final, finally, finalize?
  3. Which part of try-catch-finally can be omitted?
  4. In try-catch-finally, if there is a return in the catch, will finally still be executed?
  5. What are the common exception classes?

Module Eight: Networking

  1. What do the http response codes 301 and 302 represent? What's the difference?
  2. The difference between forward and redirect?
  3. Briefly describe the difference between tcp and udp?
  4. Why does tcp have to shake hands three times, can't it be done twice? Why?
  5. Tell me how tcp sticky packets are generated?
  6. How to achieve cross-domain?
  7. Tell me about the implementation principle of JSONP?

Module 9: Design Patterns

  1. Tell me about the design patterns you are familiar with?
  2. What is the difference between simple factory and abstract factory?

Module Ten: Spring / Spring MVC

  1. Why use spring?
  2. Explain what is aop?
  3. Explain what is ioc?
  4. What are the main modules of spring?
  5. What are the commonly used injection methods in spring?
  6. Are beans in spring thread-safe?
  7. What kind of bean scope does spring support?
  8. What are the ways to automatically assemble beans in spring?
  9. What are the implementation methods of spring transactions?
  10. Talk about spring transaction isolation?
  11. Tell me about the spring mvc running process?
  12. What are the components of spring mvc?
  13. What is the role of @RequestMapping?
  14. What does @Autowired do?

Module Eleven: Spring Boot / Spring Cloud

  1. What is spring boot?
  2. Why use spring boot?
  3. What is the spring boot core configuration file?
  4. What are the types of spring boot configuration files? What's the difference?
  5. What are the ways of spring boot to achieve hot deployment?
  6. What is the difference between jpa and hibernate?
  7. What is spring cloud?
  8. What is the role of spring cloud circuit breaker?
  9. What are the core components of spring cloud?

Module 12: Hibernate

  1. Why use hibernate?
  2. What is an ORM framework?
  3. How to view the printed sql statement on the console in hibernate?
  4. How many query methods does hibernate have?
  5. Can hibernate entity classes be defined as final?
  6. What is the difference between using Integer and int for mapping in hibernate?
  7. How does hibernate work?
  8. What is the difference between get() and load()?
  9. Tell me about the caching mechanism of hibernate?
  10. What states do hibernate objects have?
  11. What is the difference between getCurrentSession and openSession in hibernate?
  12. Do hibernate entity classes have to have a parameterless constructor? Why?

Module Thirteen: Mybatis

  1. What is the difference between #{} and ${} in mybatis?
  2. How many paging methods does mybatis have?
  3. What is the difference between mybatis logical paging and physical paging?
  4. Does mybatis support lazy loading? What is the principle of lazy loading?
  5. Tell me about the first level cache and the second level cache of mybatis?
  6. What are the differences between mybatis and hibernate?
  7. What kind of executors (Executor) does mybatis have?
  8. What is the implementation principle of the mybatis paging plugin?
  9. How does mybatis write a custom plugin?

Module Fourteen: RabbitMQ

  1. What are the usage scenarios of rabbitmq?
  2. What are the important roles of rabbitmq?
  3. What are the important components of rabbitmq?
  4. What is the role of vhost in rabbitmq?
  5. How are rabbitmq messages sent?
  6. How does rabbitmq ensure the stability of messages?
  7. How does rabbitmq avoid message loss?
  8. What are the conditions to ensure the success of message persistence?
  9. What are the disadvantages of rabbitmq persistence?
  10. How many broadcast types does rabbitmq have?
  11. How does rabbitmq implement a delayed message queue?
  12. What is the use of rabbitmq cluster?
  13. What are the types of rabbitmq nodes?
  14. What issues should be paid attention to when building a rabbitmq cluster?
  15. Is each rabbitmq node a complete copy of the other nodes? Why?
  16. What happens if the only disk node in the rabbitmq cluster crashes?
  17. Does rabbitmq have any requirements for the stop order of cluster nodes?

Module 15: Kafka

  1. Can kafka be used independently of zookeeper? Why?
  2. How many data retention strategies does kafka have?
  3. Kafka is set to clear data for 7 days and 10G at the same time. By the fifth day, the message reached 10G. How will Kafka handle it at this time?
  4. What will cause kafka to run slowly?
  5. What should I pay attention to when using Kafka cluster?

Module Sixteen: Zookeeper

  1. What is zookeeper?
  2. What functions does zookeeper have?
  3. How many deployment modes does zookeeper have?
  4. How does zookeeper ensure the state synchronization of master and slave nodes?
  5. Why is there a master node in the cluster?
  6. There are 3 servers in the cluster, and one of the nodes is down. Can zookeeper still be used at this time?
  7. Tell me about the notification mechanism of zookeeper?

Module Seventeen: MySql

  1. What are the three normal forms of the database?
  2. There are a total of 7 pieces of data in an auto-increment table, delete the last 2 pieces of data, restart the mysql database, and insert another piece of data, what is the id at this time?
  3. How to get the current database version?
  4. Tell me what is ACID?
  5. What is the difference between char and varchar?
  6. What is the difference between float and double?
  7. What is the difference between inner join, left join and right join in mysql?
  8. How is mysql index implemented?
  9. How to verify whether the mysql index meets the requirements?
  10. Talk about database transaction isolation?
  11. Tell me about the engines commonly used by mysql?
  12. Tell me about mysql row locks and table locks?
  13. Talk about optimistic locking and pessimistic locking?
  14. What are the methods for troubleshooting mysql problems?
  15. How to do mysql performance optimization?

Module 18: Redis

  1. What is redis? What are the usage scenarios?
  2. What are the functions of redis?
  3. What is the difference between redis and memecache?
  4. Why is redis single-threaded?
  5. What is cache penetration? How to deal with it?
  6. What data types does redis support?
  7. What are the java clients supported by redis?
  8. What is the difference between jedis and redisson?
  9. How to ensure the consistency of cache and database data?
  10. How many ways does redis persist?
  11. How does redis implement distributed locks?
  12. What are the defects of redis distributed lock?
  13. How does redis do memory optimization?
  14. What are the redis elimination strategies?
  15. What are the common performance problems of redis? How to solve it?

Module 19: JVM

  1. Tell me about the main components of jvm? and its role?
  2. Tell me about the jvm runtime data area?
  3. Talk about the difference between the stack?
  4. What are queues and stacks? What's the difference?
  5. What is the Parental Delegation Model?
  6. Tell me about the execution process of class loading?
  7. How to judge whether the object can be recycled?
  8. What are the reference types in java?
  9. Tell me what garbage collection algorithms does jvm have?
  10. Tell me what garbage collectors does jvm have?
  11. Tell me about the CMS garbage collector?
  12. What are the new generation garbage collector and the old generation garbage collector? What's the difference?
  13. Briefly describe how the generational garbage collector works?
  14. Tell me about jvm tuning tools?
  15. What are the commonly used jvm tuning parameters?

write at the end

What I want to say is that there are no people who are born to fail, only those who are willing to fail! I have been watching the fire from the other side. I can’t make myself successful if I don’t do anything. I can only be an ordinary worker for the rest of my life. At the age of 35 (maybe not 35 years old), I was shot to death on the beach by my younger generation, and then what? Going to be a Didi driver? To deliver food? Can you accept yourself like this? Can you accept an annual salary of 20w-80w to a monthly salary of 2k?

I don't think anyone would!

Therefore, improving our technology is the key for us as technicians to gain a firm foothold in the trend of the Internet. As long as your technology is sufficient, the 35-year-old middle-aged crisis has nothing to do with you. Go and see what Ali P8 has . How many are not 35+ ?

If you want to be able to break through yourself in the future and realize your dream of a big factory, then maybe you need to read the above "Golden Three Silver Four Newly Released "Java Intermediate and Advanced Interview Questions Collection"", hoping to help your career development.

Guess you like

Origin blog.csdn.net/javaAnPou/article/details/130485120