Interview summary ——Java Skills a senior engineer should master

I also summed up one and two before the interview , This third part may be more inclined to the inner monologue and the summary of interview skills .....

One , monologue

I interviewed people before , Now it's your turn to find a job , How to put it? , Every interviewer's opinion is different , The way of interview is different , For example, when I interview people, I like to ask about the projects that he uses , Then ask some questions about the technology used , Or I like to ask about some technical solutions for some scenarios , For example, when your interface service data is intercepted , How do you prevent data from being submitted maliciously ?
relatively speaking ,Java The bottom and foundation of , Of course, asking less doesn't mean not asking , It's about your projects and your design ideas . of course , Know the basics and the bottom better , This will let you know , Know why , The written code and program are more robust and maintainable . So , The foundation is still very important .

Now it's your turn to go out for an interview , How to put it? , Actually, I'm nervous , I thought I would not be nervous or anxious , actually , Still have , When you don't find the right job , I can't even sleep at night , I always feel that something is on my mind , I don't feel comfortable sleeping . Since I can't sleep , Let's look at the information , I have a habit , Some problems before going to bed , The next morning, I can think of the answer , Take notes before going to bed , The next morning, I can remember it very deeply , No more bullshit , Go straight to the point .

Two , Interview skills

1, Memorize your resume

reason : First question of interview , It's usually about introducing yourself , Or introduce your recent project , And an interviewer , If you don't know your resume well , For the items mentioned in it , If technology can't be described clearly , I don't think any company will accept this , Even if you are a super talent , You can't express yourself , I guess it's a headache , therefore , Remember : Be sure to recite your resume , You don't have to write it all down , At least remember the two companies you've been with recently , The projects you have done in these two companies , Module you are responsible for , The technology used in the project and the corresponding technical implementation scheme ( This is especially important ).

2, In depth understanding and memorization Java Basic knowledge

reason : Most companies interview junior or senior , Whether it's a written test or an interview , They will ask a series of basic questions , These basic questions include jvm, character string , aggregate , Threads, etc , You can't remember every one of them , So it's memory in understanding , take jvm In terms of
, If I ask you to talk about your right jvm Understanding of ,
So you have to know first JVM What are the structure components , What does each structure do , Then consider a Java Objects from creation to recycling , How to approach JVM Of these structures . If you synthesize memory from these aspects , Believe in doing more with less , And you understand it better .
As for the meeting , give an example List Under collection ArryList,LinkedList,Vector The difference between equal sets , So the same way , You need to understand the structure of each one , You know what he does , So you can use it more succinctly , And during the interview , Not dumb .

3, Maintain self-confidence and a heavy and calm mind

reason : During the interview , Confidence is indispensable , Believe you can , On the way to the interview, you can say to yourself : I belive I can !
That's what I did anyway , My heart , In fact, when facing the interviewer , Your self-confidence will also make the interviewer think you are a very confident person , At least I feel like I'll give you a high score . The other thing is to stay calm , If you want to provide a technical solution or talk about a technical principle , There's no need to talk about everything , You can tell the interviewer : Let me think first , And then assemble the knowledge in memory , Language under assembly , Put it in order , So that you can show your talent better , isn't it? ?
Everyone will be nervous during the interview , I get nervous, too , Sometimes I forget what I remember , No problem , Boldly forget , Or I don't know .
Remember , Part of it doesn't matter , If you know everything , Then you should be CTO Level up ( To make fun of ).

4, Try to remember that you can't answer the interview or that there are inappropriate questions

reason : It doesn't matter if the interview fails , After all, every company has different requirements , The questions you ask may differ from what you are good at , But remember one thing : You can't answer the questions during the interview , Or you feel like you're not answering the right questions , Write it down , If not , You can ask the interviewer on the spot if he has a good answer , If the interviewer doesn't want to tell you ( Generally speaking, the interviewer is lazy to answer you ), Then you go home and check the data , If it's some specific technology , You can also write your own cases or something , After all, there are so many knowledge points , Problems vary , Principle unchanged , Interview is also a process of learning knowledge , Let you know the technology that most companies need or require at present . I don't know this time , Next time

5, Before the interview , It's better to know about the company you are going to interview ( Including products , Project situation )

reason : it is said that , know yourself as well as the enemy , you can fight a hundred battles with no danger of defeat , Interview is a battle , You need to know the basic information of your interview company , Including job requirements , In this way, you can roughly know the technical requirements of the company you need to interview .
Why let you know the company's main products and projects , So that you can get a general idea of the technical structure of the company , Including the questions and doubts you may have about one of their implementations , I'm sure the interviewer would like to help you with these questions . So you're trying to show , And learned , Why not .

6, Arrange your interview time reasonably ( If there's an interview with more than one company , Try to put the company you want to go to last for an interview )

reason : I don't think many people understand that , Maybe most people are confused about how to arrange the interview time , Arrange at will . But here's a trick , If there are multiple interview opportunities at the same time , You put your favorite company at the bottom of the interview , So you've gone through the previous corporate screening , If it works, it's an opportunity , If it doesn't work , For the last .
But here are two things to consider :1, You need to remember the company and basic information of your resume ( That means you're not from Haitou )
2, If you can't remember , Then you can answer it for a while , After learning about the company , By email or other means , Adjust interview time . It is also suggested that no more than two interviewing companies should be arranged for one day , The best is in the morning , One in the afternoon , So you have plenty of time to adjust .

Three , Basic summary of interview questions

1, JVM Structural principle ,GC Detailed explanation of working mechanism

answer : Specific reference :JVM structure ,GC Detailed explanation of working mechanism , Speaking of GC, Remember two things :1,GC It is responsible for reclaiming the memory space of all objects without any reference .
be careful : Garbage collection is about the memory space occupied by objects without any reference, not the objects themselves ,2,GC Two algorithms of recovery mechanism ,a, Reference counting b, Reachability analysis algorithm (
Accessibility here , You can see the basics 2 Java What period of an object ), As for the more detailed GC Algorithm Introduction , You can refer to :Java GC Mechanism algorithm

2,Java Object lifecycle

answer : Creation phase , Application stage , Invisible phase , Unreachable stage , Collection stage , End stage , Object space reallocation phase and so on , Specific reference :Java Object lifecycle

3,Map perhaps HashMap Storage principle of

answer :HashMap Is by array + A structure of linked list , Specific reference :HashMap Implementation principle of

4, When data table A,B Combined index of fields , Then use it alone A Or use alone B Will it be indexed ?( use like How does query have index effect )

answer : see A,B When two fields are combined for index , Who is in front , Who is in the back , If A before , Then use it alone A There will be an indexing effect , Use alone B No , vice versa . Homology , use like Fuzzy query , If you just use the front %, So it has index effect , If double % Number match , Then there is no index effect

5, When database stores date format , How to consider time zone conversion ?

answer : use TimeStamp , Reason reference :Java Time zone conversion problems encountered in programming

6,JavaObject What are the methods in the class ?

answer :Object What are the methods

7,HTTP agreement ,GET and POST The difference between

answer : Discussion on HTTP in GET and POST The difference between

Four , thread , Design pattern , Cache aspect

1,SimpleDataFormat Non thread safe , How to use it better and avoid risks

answer : about SimpleDateFormat Safe time format thread safety

2, How to treat design pattern , And briefly talk about your understanding of the observer model

answer :1, The design mode is used by Magic Horse 2, Observer pattern class diagram and its implementation

3, In cluster environment ,session How to share

answer :1,Java Cluster session share 2,session Multi server sharing scheme , Another solution is to use a fixed server to maintain session, Shared by other servers

4, Distributed , In cluster environment , How to refresh the cache , How to keep in sync ?

answer :A, How to refresh the cache ?1, Timed refresh 2, Active refresh override , Each caching framework has its own refresh mechanism , Or cache invalidation mechanism , Take it Redis and Ehcache give an example ,
They all have their own expiration mechanisms , In addition, when actively refreshing the overlay , Just get the corresponding key Just overwrite the data

B, How to keep cache synchronized ?
this redis Cluster synchronization mechanism with its own , Copy function , Specific reference : be based on Redis Distributed cache implementation ,Ehcache There are also distributed cache synchronization configurations , Just configure different server addresses , reference :Ehcache Distributed cache synchronization

5, One sql Long execution time , How do you optimize , From what aspects ?

answer :1, see sql Whether to involve multi table joint table or sub query , If any , See if business splitting can be performed , Relevant fields are redundant or merged into temporary tables ( Business and algorithm optimization )

2, Queries involving linked lists , Whether to query by table , Field integration of results after single table query

3, If neither of the above can be operated , Non linked list query , Consider indexing the corresponding query conditions . Speed up query

4, History table separation for large number of tables ( Such as transaction flow sheet )

5, Database master-slave separation , Separation of reading and writing , Reduce the pressure of reading and writing to the same table at the same time , As for master-slave synchronization ,MySQL It has its own binlog realization Master slave synchronization

6,explain analysis sql sentence , View execution plan , Whether the analysis index is used , Analyze scan lines, etc

7, see mysql Execution log , See if there are other problems

Personal understanding : Basically , Query slow is occupied mysql More memory , Then we can consider it from this aspect

Five , Design related

The interview will also ask some questions about the design , such as

1, Your interface service data has been intercepted , How do you prevent data from being submitted maliciously ?

answer : We can set a service number in the interface transmission parameters , This number is used to distinguish whether to submit repeatedly . So even if the data gets caught , The other side can't distinguish what you mean by each field , At this time , The function of this business number is coming

2, Suppose the server often goes down , How do you check the problem ?

answer : I'll leave this for you to add , Reply with comments

All in all, we have to see , Still have to learn 学.再次强调,基础很重要!面试技巧同样很重要,还是那句话:祝愿各位看官都能找到心仪的工作吧~~