September's hottest BATJ big factory Java interview questions analysis summary, professional programmers who have moved bricks for 20 years to share!

Foreword:

I believe that most Java development programmers have experienced Ali's interviews more or less, and they know that Ali's Java interviews are difficult. I have experienced many interviews with Ali. Some are satisfied and some have suffered. Therefore, the editor summarized my so many interview experiences. It is at the time of the golden nine and silver ten. I hope it will be helpful to everyone.

Ali articles:

Small code farmers also have big goals, the latest BATJ big factory Java interview questions analysis summary in September

 

Due to space reasons, the answers are not written, and they are all summarized as notes. Those who need complete documents and answers can privately write the keyword [Enter Dachang] to get a free way to receive them.

  • HashMap data structure-lead to the difference between Java7 and Java8
  • Under what circumstances will a linked list be converted to a red-black tree
  • In addition to the data structure, what is the difference between Java8 and Java7 in HashMap
  • Expansion process, under what circumstances will the expansion
  • Why is the initial value of capacity in the expansion mechanism 16? Can it be customized to 15? Why must it be a power of 2?
  • Briefly introduce the hash algorithm, its core performance, or what is the index to judge the quality of a hash algorithm, the implementation of the indexFor() function
  • What problem does HashMap solve? -Lead to hash collision
  • Introduce the data structure of ConcurrentHashMap
  • How many concurrent threads can ConcurrentHashMap support
  • ConcurrentHashMap belongs to a class under JOC, understand the JOC package
  • Have you ever used synchronized, have you encountered concurrency problems before, and how to deal with them
  • In terms of the Java technology stack, are there any points that are better or in-depth understanding? Have you seen something from the source code and
    introduced the Netty principle.
  • Know NIO, BIO, AIO? Introduce the similarities and differences, how to use in the code?
  • Have you used distributed locks? What function is used? What use scenario?
  • Can you introduce the garbage collection mechanism?
  • The data structure of redis is introduced. Which ones have been used in the project? What scene
  • What is idempotence? How to protect?
  • How to guarantee data consistency in the trading system?

database

  • How much do you know about MySQL-lead to the knowledge points that must be asked (emphasis added!!! Transactions and indexes)
  • What is the isolation level used by MySQL, and what problems will occur under this isolation level-lead to database concurrency problems
  • When MySQL uses this isolation level, how does it solve the problem of phantom reading (extension, understand the principle of solving other concurrency problems)
  • MySQL tuning mechanism, what are the main tuning aspects-lead to index
  • In MySQL's InnoDB storage engine, the two concepts of clustered index (or clustered index) and non-clustered index
  • What data structure is used to store indexes in MySQL-here should lead to B+ tree
  • Why is the query speed faster through the index-here should lead to the binary tree algorithm

Second round:

  • Self introduction
  • What is the usage scenario of mongoDB in the project? How is it deployed? How to ensure high availability?
  • Can you introduce the memory structure of JVM?
  • What are the advantages and disadvantages of CMS and G1? When does FULL GC happen? When to stop the world!
  • What kind of object can be the root node?
  • One class, two functions, one read and the other write, write function plus synchronized, read function still need to add? What does the voliate keyword do?
  • When designing the database, how to set the primary key? Is it better to be self-incremented or not? Why?
  • Introduction to mysql lock types
  • How to check if the online CPU is 100%?
  • Write an algorithm, give a number, a monotonic array, the method returns the first subscript in the array greater than the given number, if not, return -1.

Three rounds:

The third round is a more in-depth question. They talk about their own program ideas in combination with the business. If there is no certain technology and development experience, this is an incomplete answer, and I have fallen at this level.

  • How to achieve an efficient reverse output of a singly linked list?
  • It is known that sqrt(2) is approximately equal to 1.414, and it is not required to use a math library. Please find sqrt(2) accurate to 10 digits after the decimal point
  • Given a binary search tree (BST), find the Kth smallest node in the tree
  • LRU caching mechanism
  • Regarding the difference between epoll and select, which of the following statements are correct
  • From the analysis of the index structure of InnoDB, why the key length of the index cannot be too long
  • Given a linked list, delete the Nth node from the bottom of the linked list, and return the head node of the linked list
  • If you are asked to design a universal system that supports second-level backup and recovery of various databases, how would you design
  • If you were asked to design a data flow and processing system that supports the real-time flow of data between databases, NOSQL and big data, what issues would you consider? How to design?
  • Given an integer array and an integer, return the indexes of the two arrays. The sum of the numbers pointed to by these two indexes is equal to the specified integer. Need the best algorithm, analyze the space and time complexity of the algorithm
  • If you are given a new product, from what aspects will you guarantee its quality?
  • Please evaluate the execution result of the program?

Tencent articles:

Small code farmers also have big goals, the latest BATJ big factory Java interview questions analysis summary in September

 

Java basics

  • What are the several basic data types in JAVA and how many bytes each occupy.
  • Can the String class be inherited and why.
  • The difference between String, Stringbuffer, StringBuilder.
  • What is the difference between ArrayList and LinkedList.
  • Talk about the instantiation order of classes, such as parent class static data, constructor, field, subclass static data, constructor, field, when new, their execution order.
  • Which Map classes have been used, are there any differences, is HashMap thread safe, what is the Map used concurrently, and what are their internal principles, such as storage method, hashcode, capacity expansion, default capacity, etc.
  • Why did JAVA8's ConcurrentHashMap give up the segment lock? Is there any problem? If you design it, how do you design it.
  • Are there any Map implementation classes in order, and if so, how do they ensure ordering?
  • The difference between abstract class and interface, can a class inherit multiple classes, can an interface inherit multiple interfaces, and can a class implement multiple interfaces?
  • What is the difference between inheritance and aggregation.
  • What are the IO models, talk about nio you understand, what is the difference between him and bio, aio, talk about the reactor model.
  • The principle of reflection, what are the three ways that reflection creates class instances.
  • In reflection, the difference between Class.forName and ClassLoader.
  • Describe several implementations of dynamic agents, and state their respective advantages and disadvantages.
  • The difference between dynamic proxy and cglib implementation.
  • Why the CGlib method can implement proxy for the interface.
  • The purpose of final.
  • Write three singleton mode implementations.
  • How does HashSet in Java work internally.
  • What is serialization, how to serialize, why serialization, what problems will be encountered in deserialization, and how to solve them.

JVM

  • Under what circumstances will stack memory overflow occur.
  • The memory structure of the JVM, the ratio of Eden and Survivor.
  • Why should JVM memory be divided into new generation, old generation, and persistent generation. Why is the new generation divided into Eden and Survivor.
  • What is a complete GC process in the JVM, how to promote the object to the old age, and talk about the main JVM parameters you know.
  • Do you know which types of garbage collectors, their advantages and disadvantages, focus on cms and G1, including principles, processes, advantages and disadvantages.
  • The realization principle of garbage collection algorithm.
  • When there is a memory overflow, how do you troubleshoot?
  • Simply talk about the class loader you know, can it break parental delegation and how to break it.
  • The difference between g1 and cms is the garbage collector choice of throughput priority and response priority.
  • How to print thread stack information.

Open source framework

  • Briefly talk about the structure of tomcat, its class loader process, thread model, etc.
  • How to tune tomcat and what parameters are involved.
  • Talk about the Spring loading process.
  • The realization principle of Spring AOP.
  • Talk about the propagation properties of Spring transactions.
  • How does Spring manage transactions.
  • Tell me about your understanding of Spring, the principle of non-singleton injection? Its life cycle? The principle of cyclic injection, the realization principle of aop, talk about several terms in aop, how they work with each other.
  • The initialization process of DispatcherServlet in Springmvc.
  • Netty's threading model, how netty is based on the reactor model.
  • What is the communication protocol of netty.
  • The annotations used by springmvc, what are their functions, and their principles.
  • springboot startup mechanism

Baidu articles:

 

  • Self introduction and project introduction
  • Do you understand spring-cloud? Spring-boot understands, talk about bean life cycle
  • Improvements after hashmap-1.8, why hashmap is not thread safe
  • How to achieve thread safety, how is concurrenthashmap achieved
  • Which design patterns are used
  • Have you used ThreadLocal?
  • Class loading mechanism
  • JVM-Memory Model
  • Garbage collection
  • Have you read the redis source code?
  • Introduce your project and its difficulties?
  • What is the role of reflection?
  • Data warehouse, multithreading and concurrency tools, etc.?
  • Private cloud, docker and k8s, etc.?
  • Know which middleware, dubbo, rocketmq, mycat, etc.?
  • How to realize the rpc in dubbo?
  • What should I do to implement rpc by myself?
  • Dubbo's service registration and discovery?
  • Give you an ordered array of integers. The numbers in the array can be positive, negative, or zero. Please implement a function that returns an integer: How many different values ​​are there in the square of all the numbers in the array.

Jingdong articles:

 

  • How to find contacts in general sql injection? Explain how sqlmap tests injection points from the source code.
  • What does masscan rely on when scanning ports, and why is it so fast? Please elaborate
  • What gadgets have you written and what modifications have you made for the tools you have used
  • How to improve the scanning speed written in python, talk about the understanding of GIL lock
  • What do you think are the common web vulnerabilities that the vulnerability you found has the most impact?
  • Have you ever played hardware security, and what is the level of research
  • Anti-crawling, if it is how you conduct anti-crawling, how to bypass anti-crawling measures. Using a headless browser is detected, how to bypass
  • How to scan with nmap scan. Sending and agreement, handshake and no handshake, which agreement handshake, which does not handshake
  • How to detect whether the other party's port is open without directly contacting the target server
  • Have you ever written a yara scan module by yourself? If you want to solve the scan {k1:v1, k2:v2, k3:v3}, ensure that a specific value appears in v1 in k1, a specific value v2 in k2, and k3, v3 . How to achieve
  • What is the principle of xss and how to implement it by yourself
  • A beef-like xss platform
  • Now that this is achieved, how to solve the cross-domain faced?
  • ip frequency limit, ip reputation model?
  • What is the SCTP protocol? How to use SCTP to optimize the network?

Interview questions:

Small code farmers also have big goals, the latest BATJ big factory Java interview questions analysis summary in September

 

to sum up:

The characteristics of talents that Internet giants prefer: enthusiasm for technology, strong technical foundation strength; initiative, good at teamwork, and good at summarizing and thinking. No matter which company it is, it attaches great importance to high-concurrency and high-availability technology and the foundation, so don't underestimate any knowledge. The interview is a two-way selection process. Don't go to the interview with a fearful attitude, which is not conducive to your own performance. At the same time, you should not only pay attention to salary, but also whether you really like this company and whether you can really get exercise.

Friends who need to get a complete interview answer can follow the editor + like the article, privately write the key word [enter the big factory] or see below to get it.

I also collected more than 20 years of company interview knowledge points and various technical points. The following screenshots are some of the screenshots I hope to be helpful to everyone, and I can get my favorite offer.

Small code farmers also have big goals, the latest BATJ big factory Java interview questions analysis summary in September

 

Small code farmers also have big goals, the latest BATJ big factory Java interview questions analysis summary in September

Guess you like

Origin blog.csdn.net/m0_46757769/article/details/108855968