The interview last week, a very deep feeling, summed up.
Interview the company probably has Ali, Ctrip, Iqiyi art, only the product will, the way cattle, Bilibili, Volkswagen reviews, Ali and Iqiyi art is telephone interview, other on-site interview.
First of all, about five years, should be a senior Development engineer, most of the interviews do not have to do problems, back string and StringBuilder difference, almost are the bottom and away, distributed and so on. Although a programmer, most of the work is still writing code, adding and deleting changes.
1 JVM
This big company basically asks, what area does the memory model, GC,JVM have? What does the stack frame save?
What are the common garbage collector features? JVM Performance tuning, these from the Zhou Zhiming JVM features that book basically has the answer, a senior programmer must read, go out to interview, at least read two times, understand, not rote, the interviewer will ask very fine, if you memorize, people casually ask, you kneel.
2 thread pool
This basic must-test, senior programmers will not ask you to start a thread which way, are high concurrency scenarios. For example, four kinds of thread pools, which are used in many different scenarios. Several important parameters of the thread pool which, these important parameters, are compared under different thread pools. High concurrency under blocking queue with which, I remember is the public comments asked me, with Linkblockqueue or arrayblockqueue, I when said, the latter bar, queue Add task fast, based on the list, they say wrong, the former, array is continuous, recovery of the fast, these are details. All that remains is a blocking queue rejection policy. The default is deny, an interviewer asked me, if the blocking queue is full, request rejection, but these requests are important, what to do? This situation in the actual development will encounter, each system always has a peak, peak, the system may not be able to handle, he said, this time first put all the requests fell database, or MQ, after processing, the real scene will encounter, you may not have encountered before, but the interviewer will ask these, think you have the ability to think. Thread pool, tomcat by default on the thread pool, will ask the tuning, all systems are basically inseparable.
3 lock
This is also a must test, although the development sometimes do not, basic will ask, syncnizched keyword, function, class lock, Object lock, Method lock difference?
static method lock, two threads will be mutually exclusive, non-static method, lock, will be mutually exclusive? This is relatively simple. This keyword, built-in object lock, is stored in the object's object header after the JVM creates the object. Then and lock lock difference, this if you go back, may not understand, I understand, if there is a toilet, a lot of people want to go on, if it is sync lock, everyone will not time to knock, toilet someone, very consumption performance, CPU switch, but lock lock, equivalent to add an administrator, holding a brand, In a person, lined with someone, the rest of the see, will not go to the door, people go, the brand changed, Java, is based on the Volitale keyword, through the Aqs guarantee, there is sync blocking, such as a person in the toilet play mobile phone, sync can only wait. Release the lock, but lock, can be interrupted, or other operation. Ask the deep will ask lock optimization and the like, though. Development is not a basic use, but you want to get a high salary, you have to. Additionally, the lock of the database is asked. Table lock. Lock's read lock, write lock, how to use. Principle. This piece must be understood in depth. Otherwise it can only be abused.
4 Cache
This basic must test, Redis, ask a lot of questions, ES may ask, distributed system, Redis's unique ID can do? New data came, whether it was a database or a redis, expiration policy, when to use Redis cache, when used as a database, and Es,mongo, the difference. This is just a cache, a little look, won't ask very deep.
5 MQ
Message Middle price, the basic use of distributed system, principle, which several components, Kafka and RABBITMQ, the difference?
How to ensure that messages are not lost. Based on what kind of protocol? What's his advantage? How your project uses it. Point-to-point, subscribe to publish, differentiate, your understanding.
6 distributed
What is distributed. A server problem caused Metrorrhagia to do, four-layer load balancing and seven-layer difference, say what RPC framework used. Dubbo based on which protocols, how services are registered, and how are they discovered? This basic test some, of course, do not require you are proficient, the general principle of understanding is good.
7 Spring
Bean's life cycle, Spring's core, spring's proxy mode, dynamic agent, third-party cglib which scenarios are used, and which design patterns are used in spring.
Spring's transaction, propagation behavior. What are the common annotations?
8 SPRINGMVC
Principles, common annotations. And struts, this also takes some time to prepare.
9 Integrated
This must test, important important important, say three times. Which common collections, several sets, differences, such as ArrayList and linklist differences, performance, this is the basis, ask the most, most, most, Hashmap,concurrenthashmap, JDK7 and Jdk8concurrenthashmap difference, implementation, principle, two JDK size () method how to implement? This is the best source to see a few times, what initialization, expansion, the bottom why to use the array to add the list of red and black trees, what is the red black tree, the majority of companies will test, see your ability.
10 Database
Index, required, based on B + Tree, unique index, normal index, Federated Index, join whether to invalidate the index, the leftmost principle of the federated index, two fields with a federated index, two with, or the first field, query, will not be implemented, with the right field, invalidation, and so on. Some will make you handwriting SQL, database engine, MyISAM and InnoDB differences, basically won't ask anything else.
11 Synchronous IO Blocking IO
NIO Bio AIO differences, usage, B Ali and Iqiyi have asked.
12 other
The other asked not much, above basic all, performance optimization. System stability. Ask before the project.
Summarize
Most of the questions, development is not used, but want to get a high salary. or prepare for the basics, because the company will measure the interview to see if you are a talent. In addition, occasionally there will be written tests, to Bilibili, cattle, written questions, writing algorithms, Hey, Pit Daddy, in short, more preparation, more interviews. In addition to meet the interviewer asked, you will not, to ask him the answer. Or the next interviewer asks if you're still not.
A four or five-year Java development programmer, what to prepare for the interview?