2019 Shanghai pen gently java interview questions (including interview questions resolved)

 本人3年开发经验、18年年底开始跑路找工作,在互联网寒冬下成功拿到阿里巴巴、今日头条、上海轻轻等公司offer,岗位是Java后端开发,最终选择去了上海轻轻。  
 面试了很多家公司,感觉大部分公司考察的点都差不多,所以将自己的心得记下来,希望能给正在找或者准备找工作的朋友提供一点帮助。另外,目前在上海轻轻也做面试官的工作,身份从求职者变为面试官,看问题的很多角度也不一样,所以下文中既有求职者的视角,也有面试官的视角

Interview Process
  Under the first interview process, large companies generally have a 3-4 round of technical, HR faces one of. Gently on Shanghai, I experienced a total of four technical side, the first two rounds is the main basis for asking and project implementation, the first three are intersecting faces, two interviewers, mainly to ask project implementation and development. The first four are departments face the boss, asked to understand some of the major infrastructure, technology and business, personal development more abstract things.

Note that point
resume one to two is the best, the project experience to write about 2-3 on the same subject, be sure to write the most highlights of the project
starting time work experience to write clearly, while large companies have back tune, do not merge or omit some relatively short period of work experience, the impact may not be just the interview, but later may not get into the company
blog nothing articles, github did not write a good project in a resume
for interview problem officer, to think clearly before you answer, if you feel that the time required may be relatively long, can be said that the idea of my thinking, my next class finishing with the interviewer

During the interview pay attention to speech rate and articulation, after I do the interviewer, found that many people tend to speak quickly, or slurred speech, also cause problems that would otherwise make the interviewer feel that you did not answer the point on (in particular, telephone surface)

Interview after interview results do not directly ask

Technical inspection
In general, technology-related study is divided into two blocks, one foundation, the second is experience.

Basis including java-based, database, middleware, from preparation before the daily accumulation and interviews.

Previous experience includes projects done, solve problems, and some scenes problems (such as your project if the traffic flow tenfold how to ensure available).

  In this paper, say something about the problem, the whole point of advanced technology are more put under the following link, if you can get into the group fails, some of my own summary, some are close (copy) set (attack) the other's.

set

The collection is divided into two blocks: Thread safety in non-thread-safe collection and under java.util java.util.concurrent package collection.
List

ArrayList and LinkedList implementations and distinguish
Map

HashMap: to understand the data structures, how to hash conflict resolution (list and red-black tree), the timing of expansion, optimization rehash of time to avoid expansion

LinkedHashMap: understand the basic principles, what two orderly, how to use it to achieve LRU

TreeMap: understand the data structure to see why the key target must be to achieve Compare the interface, how to use it to achieve consistent hashing

Set

Set basically achieved by a corresponding map, look like simple
common problems

How to hash hashmap resolve the conflict, why hashmap in the list need to turn into a red-black tree?
hashmap When will trigger the expansion?
Why concurrency problem when there is infinite loop hashmap before jdk1.8?
When hashmap expansion need to be calculated once for each entry hash it?
Why hashmap array length to ensure a power of 2?
How to implement LRU with LinkedHashMap?
How to achieve consistency with the hash TreeMap?
Middleware, storage, and other frameworks
Spring

bean life cycle, circular dependencies, spring cloud (such as projects have used) to achieve the AOP, spring transaction propagation
FAQ

java dynamic proxy and proxy cglib dynamic difference (often used in conjunction with the spring so we asked to put here)
spring in the bean's life cycle is how?
What kind of problems have circular dependency injection and constructor injection property?
Dubbo (or other Rpc frame)
is understood as a common framework for Dubbo RPC implementation: service discovery, routing, asynchronous calls, limiting downgrade, failure retry

common problem

How Dubbo do load balancing?
How do Dubbo limiting downgrade?
How Dubbo elegant service offline?
How Dubbo asynchronous calls?
RocketMq (or other message middleware)

A common understanding of messaging middleware such as RocketMq implementation: how to ensure high availability and high throughput, message sequence, repeated consumption, transaction messages, delay messages, dead letter queue
FAQ

How RocketMq ensure high availability?
How RocketMq ensure high throughput?
RocketMq news is ordered it?
How to order RocketMq local news is guaranteed?
Implementation mechanism RocketMq transaction messages?
RocketMq be a problem repeated consumption of it? How to solve?
What level of delayed messages RocketMq support? How to achieve it?
RocketMq is a push model or pull model?
Consumer load balancing is kind of how?
Collected from all sides, there is a current company, also has its own summary, the following picture, there are self-created, if necessary

Redis (or other caching system)

redis working model, redis persistence, redis expired elimination mechanism, redis common form of distributed clusters, distributed lock, buffer breakdown, avalanche cache, cache coherency problem
FAQ

Why redis high performance?
how single-threaded redis advantage of multicore cpu machine?
redis cache elimination strategy?
How redis persistent data?
redis which has several data structures?
redis clusters, which has several forms?
There are massive key and value are relatively small data, how to store it in a more efficient memory in redis?
How to ensure data consistency and redis DB in?
How to solve the cache and cache penetrate the avalanche?
How to implement a distributed lock with redis?
Mysql
data structures, transaction isolation level, locks, indexes, clustered indexes and non-clustered index, the leftmost matching principle, query optimization (explain commands)
Recommended Reading:
- http://hedengcheng.com/?p=771
- https://tech.meituan.com/2014/06/30/mysql-index.html
- http://hbasefly.com/2017/08/19/mysql-transaction/
FAQ

Mysql (innondb the same below), which has several transaction isolation level?
What are the different transaction isolation level locks will be added?
mysql row lock, the table lock, the lock gap, intent locks are doing what?
Talk about what is the leftmost match?
How to optimize slow queries?
mysql index Why is b + tree instead of b tree, red-black tree
how sub-library sub-table selection menu key points
in the case of sub-library sub-table, the query is generally how do sort?
zk

zk general principle (under similar can understand the principle of Raft algorithm), zk achieve distributed lock, zk do cluster master election
Frequently Asked Questions

How to implement a distributed lock with zk, and there are advantages and disadvantages redis distributed lock

Guess you like

Origin www.cnblogs.com/look-look/p/11857504.html