[Successful landing] 2 years of development experience successfully got Baidu development post offer, share my experience and hope to help everyone!

Preface

For the interview with a big factory, I want to emphasize that the mentality is really important. It is the key to determining your performance in the interview process. If you can’t perform normally, it’s likely that you missed the offer because of a small mistake, so you must pay attention to it. stand up. Another reminder, full review is the key to eliminating your nervous state of mind, but if you review enough, you will naturally have more confidence in the interview process.

one side


I have prepared interview materials for first-line manufacturers and my original super-hard core PDF technical documents, as well as many sets of interview questions for large manufacturers (constantly updated). Friends in need can click here to remark csdn and download by themselves Then I hope everyone can find the job they want!

JAVA basics

  • Is the bottom layer of Hashmap, is it thread safe, and what problems will arise in the case of high concurrency?

  • How to make hashmap safe?

  • The underlying implementation of Concurrenthashmap

  • What is reflection?

  • What should the key pay attention to when putting Hashmap (hashcode and equals)

Thread

  • Thread implementation

  • Thread pool parameters

  • Thread abandonment strategy

  • Whether the work queue in the thread is bounded

  • Implementation process of thread pool

  • The role of Volatile

  • Tell me in detail happens-before

  • The difference between ReetrantLock and sychronized

  • Sychronized lock (bias lock-spin lock-heavyweight lock)

  • How to solve the problems in CAS

JVM

  • Introduce what is JMM?

  • How does JAVA create objects? What is contained in the object header?

  • JVM memory area? What is stored in the virtual machine stack?

  • Algorithm for garbage collection?

  • What objects can GC roots be

  • Tell me more about the parent delegation mechanism?

  • Can the parent delegation mechanism be broken? (Rewrite the classload method yourself, or set the search parent to null)

  • What are the class loaders?

  • Where does the loaded class information exist?

  • Talk about object locks and class locks?

Spring

  • Talk about the implementation of Spring AOP

  • Those design patterns used in Spring

  • The generation process of Bean object in Spring

Mysql

  • What are the database engines? The difference between them

  • What are the MySQL indexes?

  • What is MVCC?

  • What should I do if I find a slow query?

  • What are the keywords in Explain? (Id, table, type, key, rows)

  • The difference between Hbase and MySQL?

  • Does MySQL guarantee atomicity? (Using the undo log to achieve atomic consistency, when the transaction is rolled back, you can use the undo log to roll back, if you inert, you need to delete at this time; he records the information required for the rollback)

Zookeeper

  • Talk about Zookeeper (file configuration, cluster management, distributed lock, queue management) (monitoring mechanism: ZooKeeper's Watcher mechanism mainly includes three parts: client thread, client WatcherManager, and Zookeeper server. The client is registered with the ZooKeeper server at the same time , The Watcher object will be stored in the client's WatcherManager. When the ZooKeeper server triggers the Watcher event, it will send a notification to the client, and the client thread will retrieve the corresponding Watcher object from the WatcherManager to execute the callback logic) Election mechanism: half mechanism

  • Zookeeper's heartbeat mechanism

  • Do you understand load balancing?

Two sides (focus on developing issues through the project)

  • Is there any improvement for large file data upload? (Multi-thread upload, whether the static internal class of value can be used for enumeration, whether boolean can be used for bit storage)

  • 多线程的优势和缺点?(优点:高并发、多核CPU上利用上下文切换资源少)(缺点:资源少的情况下出现死锁、缓存一致性、指令重排)
    
  • Do you think instruction rearrangement may occur on the CPU?

  • If you are talking about multi-threaded context switching with less resources, can you not use processes? Exchange data using shared memory

  • Suppose there are 4 CPUs and one process on each CPU. Shared memory is used between processes? Do you think it is okay not to use threads? Like ngnix

  • Why is there cache coherency during multithreading? (Working memory and shared main memory)

  • How does Volatile guarantee memory visibility?

  • Where are working memory and shared memory?

  • So if it exists in the stack, there shouldn't be cache coherency?

  • How many cache levels are there in the MESI protocol? Which level in the cache is private and which level is shared? Where does the cache exist?

  • How can deadlock occur?

  • Will you write a deadlock?

  • Why don't you report an error after writing this?

  • Open the snapshot and ask if you can understand it? Why not report an error?

Three sides

  • Can you come for an internship?
  • Future career plan?
  • Your own strengths and weaknesses?

to sum up

.Finally, I prepared Java architecture learning materials for everyone. The learning technology content includes: Spring, Dubbo, MyBatis, RPC, source code analysis, high concurrency, high performance, distributed, performance optimization, microservice advanced architecture development, etc. Friends in need can click here to comment csdn, download it by themselves and become a programmer. It is necessary to enrich their knowledge reserves and enhance the depth and breadth of their knowledge. In my opinion, the rewards will be as much as you pay.

There are also Java core knowledge points + a full set of architect learning materials and videos + first-line interview collections + interview resume templates + Alibaba Meituan Netease Tencent Xiaomi Iqiyi Kuaishou Bilibili interview questions + Spring source code collection + Java architecture actual combat electronics Share the book with everyone for free!

Guess you like

Origin blog.csdn.net/jiagouwgm/article/details/111303610