BATJM, a line of giant is the goal of every programmer, even if, after graduation because of degree and technical problems did not enter, but in the later work, also is the accumulation of their own ability, in order to be able to enter such a line of giant with effort, it is the perseverance, moved by the technical personnel, with a line of companies so, Every year will recruit a lot of people, there are some internal qualifications, but, when such interview qualifications show in front of you, you can master it, will not be limited to the current business needs of the company, resulting in their technical level and the market has been derailed? Is it possible that because I am busy with my work and do not recharge myself, every technology stays at the level of being able to use, without in-depth understanding, which leads to the embarrassment of knowing this technology clearly in the interview?

Ok! No problem, I have helped you prepare for the interview. Here are some interview questions and materials I have prepared for you

The interview process

Interview tips

Interview brush questions material sorting

Need interview questions of friends, private letter “information” access



The interview began

Project introduction

Most cases, this is an open question in the interview, it is aimed to examine your project narrative, demand analysis, and focus on the ability of expression, it is also a lot of knock in the process of work of pure code programmers of the lack of a comparison, many programmers just feel just I strong ability to develop, and ignore other aspects ability, small make up tips: What big factory requires is all-round talent

Ali technology side

  • Java IO stream hierarchy?
  • Name a common exception type?
  • What is the full name of an SKU? What is the difference and relationship between an SKU and an SPU?
  • What can I do if I do not close a FileInputStream after it is used?
  • Designing a distributed login system?
  • Spring loading process?
  • Have you ever written an AOP transaction like Spring?
  • In Java try.. Catch closes the stream syntax sugar?
  • How to design a seckill system? What to consider?
  • Have you encountered online GC, what are the symptoms and how to solve them?
  • Spring loading process?
  • What’s the difference between atomic and volatile?
  • What is the difference between notify and notifyAll of a Thread?
  • Which thread is notifiy waking up?
  • Does Thread.sleep wake up and need to recompete?
  • How many ways can you write a singleton? What’s the difference? Which singleton do you often use and why?
  • Ask a Thread. Join question?
  • How to design data model for commodity related module system?
  • Write an example of a JAVA deadlock?
  • How do I resolve deadlocks?
  • GC recovery algorithm, and its implementation principle?
  • HashMap data storage structure? What if the key is repeated? How is it solved?
  • The implementation principle of Spring AOP, what is the underlying implementation?

Ali technology second face

The telephone interview mainly inspects three pieces of content:

  • Basic knowledge of Java, principle of open source framework, JVM, multi-threading, high concurrency, middleware, etc.
  • Previous project experience, technologies used, problems encountered, how to solve them, and what I can gain and grow;
  • Enthusiasm for technology (whether to read some technical books, visit forums, write blogs, write source code or programs, etc.);

Questions you might ask in a JAVA development technology interview?

  • Our main assessment is the network NIO distributed database high concurrency big data
  • Implementation of custom tables?
  • Dynamic form design?
  • How are in-JVM and JMM cache models tuned?
  • Common RPC framework
  • Nio and IO
  • Concurrent programming, design patterns
  • Map component?
  • What bugs in HashMap cause it to slow down?
  • How to design a HashCode for a HashMap’s key object?
  • Generic wildcards? Under what circumstances?
  • Back end: Redis? Distributed framework Dubbo? Design patterns?
  • Scenariotype question: second kill, can list the common queuing, captcha, inventory deduction mode on the high concurrency of the system?
  • Can build cache structure according to actual needs to improve website access speed, skilled in using Ehcache, OSCache and memcache.
  • I am familiar with load balancing based on DNS polling, skilled in configuring Web servers to achieve load balancing, and capable of implementing soft load comprehensively using hash or modular methods at the program level.
  • Familiar with distributed database design and optimization technology, familiar with mainstream databases such as mysql, oracle, SqlServer, hadoop hbase mangodb redis ehcache, oscache memcache. For the database processing with large data volume, it adopts the methods of table and library, database read and write separation, and building cache to optimize the performance.
  • Proficient in Lucene, able to develop large search engines based on Lucene, and use Lucene to improve and optimize database like queries.

On three sides

Introduce yourself, no more than 3 minutes (it seems to be longer this time, just over 2 minutes). Tell me which project you are familiar with and why you did the database project. What was the architecture that the company used to change the Balabala project at that time, and how was the database designed

Simple MVC architecture, database what tables does the database have and why does it have those tables

What are the main core modules, and where are the sessions that communicate with each other


image.png


How to save the session state, what are the methods and differences? How to save the cookie on the client, easy to tamper with the session and save it on the server. If the connection is large, it will bring pressure to the server.

1: simple and high performance 2: distributed and clustered 3: server power-off and restart 4: Restart of running containers such as Tomcat and Jetty Disadvantages: 1. You need to check and maintain session expiration and manually maintain cookies. 2. No frequent session data access; With the development of technology and the popularization of distributed Web applications, it becomes increasingly expensive to manage user login status through session. Therefore, it gradually develops into a token method for login identity verification, and then obtains user information cached in REDis through token. With the emergence of JWT later, the verification mode becomes simpler and more convenient. Instead of redis cache, the user information stored directly according to the token is retrieved, and the token availability is verified. Single sign-on becomes simpler.

The token of JWT contains three parts of data:

The Header contains two parts of information: the declaration type, the JWT encryption algorithm, and the customized JWT encryption algorithm. The base64 encryption algorithm is used for the Header, and the Payload is the Payload. User identity information (note that base64 encryption is used to decrypt, so do not store sensitive information) registration statement: such as the issuance time of token, expiration time, the issuer, etc., this part will also be base64 encryption, obtain the second part of the data Signature: the authentication information of the whole data. Generally according to the data of the first two steps, plus the > secret of the service (do not leak, it is best to replace periodically), generated by encryption algorithm. Used to verify the integrity and reliability of the entire data (do not leak, preferably periodic replacement), generated by encryption algorithms. Used to verify data integrity and reliability

How to manage distributed session, what are your solutions Redis do cache persistent store session database store session

Studied the data structures and algorithms (of course), you can talk about the process of binary search Binary search data have already sort good, a bit requirement hypothesis is a natural ordering, after obtaining the target data to find the middle value, if the big, go to the right part of the middle value comparison, small part is to the left of the median

Says the process of fast row, write the pseudocode take a value, and then set two Pointers, a pointer to begin with the first traversal, encounter less than this value will stop, and then after another pointer used to traverse, encounter greater than this value will stop, know this two Pointers to meet, exchange at this time the value and the value of the pointer when they meet I’m going to recurse from both sides of the boundary at this coordinate

Learn which design patterns, for example in JDK source code which use your design pattern singleton: IOC container template: IOC, SpringMVC Builder pattern: Lombok Factory: IOC agent: AOP Subscribe/publish: message queue, Redis pub/sub

Do you have any questions for me (still the above three questions)

All around:

Introduce yourself, no more than 3 minutes. Introduce the project you are most familiar with. What architecture and highlights are used in the project? MVC, Lucene and AOP are used to manage permissions

Probably when can you come to practice summary all around

Five surface

Introduce yourself to do what projects you see in the question you see a lot of vendors in Hangzhou use payment TWO-DIMENSIONAL code, how do you see alipay every day so many people use alipay, these data if you store, you will how to design it (not to say that HR does not ask technical problems? Not the kui is ali’s HR) why want to pay treasure to practice technology stack, on the mobile payment is curious, you classmate how to evaluate you, teacher? If you do not agree with the opinions of colleagues happened, how would you solve it in the first place is to ensure that both sides understand each other, because some of them are caused by inadequate communication, and then the comprehensive contrast different opinion at the same time, The possible impact on the work content, and the method will be chosen according to the advantages and disadvantages



I sorted out the questions I asked during the interview so that you could see them more clearly

Java based

Java concurrency

Spring

Netty

Distributed correlation


The cache

JVM

Answer analysis part is too long, need to get the answer, you can pay attention to me, private reply “information”, clear screenshots can be viewed at the end of the article!




Through Ali’s interview, I checked these interview materials, and now share them with you, hoping to bring help to you, including the previous interview answers

Spring interview questions

For SpringMVC interview questions

SpringBoot interview questions

SPringCloud interview questions

How do I get it?

Spring, MyBatis, Netty source code analysis, high concurrency, high performance, distributed, microservice architecture principle, JVM performance optimization, distributed architecture interview information

How to send a private message?

After following me, click into my home page on the mobile phone, there is a private message in the upper right corner of the home page, click private message, how to reply to the keyword “information”